diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-06-19 23:20:42 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-06-19 23:20:42 +0000 |
commit | 37d2040807aa8ce8671fab0c235d0300efb73ab9 (patch) | |
tree | 170b1922ac461aefdb9de1053014f828374d8b00 /src/w32proc.c | |
parent | 1becdc1aa22a5994fab348d5afa01bfee9e58701 (diff) | |
download | emacs-37d2040807aa8ce8671fab0c235d0300efb73ab9.tar.gz |
(win32_wait): Massage retval into what is expected in Unix.
Diffstat (limited to 'src/w32proc.c')
-rw-r--r-- | src/w32proc.c | 11 |
1 files changed, 10 insertions, 1 deletions
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) |