From: Richard M. Stallman Date: Mon, 19 Jun 1995 23:20:42 +0000 (+0000) Subject: (win32_wait): Massage retval into what is expected in Unix. X-Git-Tag: emacs-19.34~3534 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bc69349bba9310f4cb65022f9e8f81698b758abd;p=emacs.git (win32_wait): Massage retval into what is expected in Unix. --- diff --git a/src/w32proc.c b/src/w32proc.c index e7834d6a452..1aa5a0cc6bb 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -395,7 +395,16 @@ win32_wait (int *status) errno = EINVAL; return -1; } - + + /* Massage the exit code from the process to match the format expected + by the WIFSTOPPED et al macros in syswait.h. Only WIFSIGNALLED and + WIFEXITED are supported; WIFSTOPPED doesn't make sense under NT. */ + + if (retval == STATUS_CONTROL_C_EXIT) + retval = SIGINT; + else + retval <<= 8; + cp = cps[active]; if (status)