This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 14/16] import gnulib sys_wait module


> From: Tom Tromey <tromey@redhat.com>
> Cc: Tom Tromey <tromey@redhat.com>
> Date: Wed,  6 Nov 2013 10:09:58 -0700
> 
> This imports the gnulib sys/wait.h module.
> It doesn't make any other changes to gdb.

Once again: gnulib's sys_wait.h is wrong for MinGW.  This:

> +#else
> +/* Native Windows API.  */
> +
> +# include <signal.h> /* for SIGTERM */
> +
> +/* The following macros apply to an argument x, that is a status of a process,
> +   as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess().
> +   This value is simply an 'int', not composed of bit fields.  */
> +
> +/* When an unhandled fatal signal terminates a process, the exit code is 3.  */
> +# define WIFSIGNALED(x) ((x) == 3)
> +# define WIFEXITED(x) ((x) != 3)
> +# define WIFSTOPPED(x) 0
> +
> +/* The signal that terminated a process is not known posthum.  */
> +# define WTERMSIG(x) SIGTERM
> +
> +# define WEXITSTATUS(x) (x)
> +
> +/* There are no stopping signals.  */
> +# define WSTOPSIG(x) 0
> +
> +/* There are no core dumps.  */
> +# define WCOREDUMP(x) 0

Is simply wrong on Windows.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]