From: Johannes Sixt Date: Sat, 4 Jul 2009 19:26:38 +0000 (+0200) Subject: MinGW: simplify waitpid() emulation macros X-Git-Tag: v1.6.5-rc0~86^2~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=303e7c48eae7e140a9612ff1f9b5a95ca80b65c4;p=git.git MinGW: simplify waitpid() emulation macros 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 Signed-off-by: Junio C Hamano --- diff --git a/compat/mingw.h b/compat/mingw.h index c1859c548..948de66eb 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