@matheusbsbs / matheus-bagliano / commits / 303e7c48ea
Fork 0

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 <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Sixt committed Jul 4, 2009 at 21:26 UTC 303e7c48eae7e140a9612ff1f9b5a95ca80b65c4
1 file changed +3 -2
compat/mingw.h
+3 -2
@@ -17,9 +17,10 @@ typedef int pid_t;
17 #define S_IROTH 0
18 #define S_IXOTH 0
19
20 -#define WIFEXITED(x) ((unsigned)(x) < 259) /* STILL_ACTIVE */
20 +#define WIFEXITED(x) 1
21 +#define WIFSIGNALED(x) 0
22 #define WEXITSTATUS(x) ((x) & 0xff)
22 -#define WIFSIGNALED(x) ((unsigned)(x) > 259)
23 +#define WTERMSIG(x) SIGTERM
24
25 #define SIGHUP 1
26 #define SIGQUIT 3