[PATCH 2/7] MinGW: simplify waitpid() emulation macros
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jul 4, 2009, 19:26 UTC
- Message-ID
- <d63e9230d57698a058c8a550709155e5e3222348.1246734159.git.j6t@kdbg.org>
- In-Reply-To
- <b73cf4b4cd09f4225098e71182044f64e12380aa.1246734159.git.j6t@kdbg.org>
Windows does not have signals. At least they cannot be diagnosed by the parent process; all that the parent process can observe is the exit code.
This also adds a dummy definition of WTERMSIG.
Signed-off-by: Johannes Sixt <j6t@kdbg.org> --- The dummy definition WTERMSIG will be used in a subsequent patch.
compat/mingw.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/compat/mingw.h b/compat/mingw.h index 4f7ba4c..21ab124 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -17,9 +17,10 @@ typedef int pid_t; #define S_IROTH 0 #define S_IXOTH 0 -#define WIFEXITED(x) ((unsigned)(x) < 259) /* STILL_ACTIVE */ +#define WIFEXITED(x) 1 +#define WIFSIGNALED(x) 0 #define WEXITSTATUS(x) ((x) & 0xff) -#define WIFSIGNALED(x) ((unsigned)(x) > 259) +#define WTERMSIG(x) SIGTERM #define SIGHUP 1 #define SIGQUIT 3
-- 1.6.3.17.g1665f