Skip to content

Commit

Permalink
MinGW: simplify waitpid() emulation macros
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Jul 5, 2009
1 parent 47e3de0 commit 303e7c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compat/mingw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 303e7c4

Please sign in to comment.