mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-25 03:50:29 +00:00
Fix flakes in runitd and popen_test
This commit is contained in:
parent
801224df67
commit
2ebc5781a1
18 changed files with 123 additions and 34 deletions
|
@ -116,8 +116,9 @@ void OnInterrupt(int sig) {
|
|||
}
|
||||
|
||||
void OnChildTerminated(int sig) {
|
||||
int ws, pid;
|
||||
int e, ws, pid;
|
||||
sigset_t ss, oldss;
|
||||
e = errno; // SIGCHLD can be called asynchronously
|
||||
sigfillset(&ss);
|
||||
sigdelset(&ss, SIGTERM);
|
||||
sigprocmask(SIG_BLOCK, &ss, &oldss);
|
||||
|
@ -140,6 +141,7 @@ void OnChildTerminated(int sig) {
|
|||
}
|
||||
}
|
||||
sigprocmask(SIG_SETMASK, &oldss, 0);
|
||||
errno = e;
|
||||
}
|
||||
|
||||
wontreturn void ShowUsage(FILE *f, int rc) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue