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)