]> git.eshelyaron.com Git - emacs.git/commitdiff
(win32_wait): Massage retval into what is expected in Unix.
authorRichard M. Stallman <rms@gnu.org>
Mon, 19 Jun 1995 23:20:42 +0000 (23:20 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 19 Jun 1995 23:20:42 +0000 (23:20 +0000)
src/w32proc.c

index e7834d6a452ce41f89d92f5d2f467355631d8169..1aa5a0cc6bb434606b20b4bbcc24f557ad0e367b 100644 (file)
@@ -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)