mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 22:38:30 +00:00
Improve wait statuses
This change has the insight that dwExitCode isn't an exit code but rather should be used to pass the wait status. This lets us report killing as a termination status, similar to UNIX. This change also fixes the fact that exit(259) on Windows will break the parent due way WIN32 is designed. We now work around that. It turns out that NetBSD and OpenBSD, will let you have exit codes beyond 255. This change will let you use them when it's possible.
This commit is contained in:
parent
d9d5f45e2d
commit
c8aa33e0e2
22 changed files with 259 additions and 75 deletions
|
@ -50,10 +50,6 @@ static dontubsan void RaiseSigFpe(void) {
|
|||
* helps us support Windows. So if the raised signal has a signal
|
||||
* handler, then the reported `si_code` might not be `SI_TKILL`.
|
||||
*
|
||||
* On Windows, if a signal results in the termination of the process
|
||||
* then we use the convention `_Exit(128 + sig)` to notify the parent of
|
||||
* the signal number.
|
||||
*
|
||||
* @param sig can be SIGALRM, SIGINT, SIGTERM, SIGKILL, etc.
|
||||
* @return 0 if signal was delivered and returned, or -1 w/ errno
|
||||
* @asyncsignalsafe
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue