diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-08-04 19:26:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-08-04 19:26:26 +0000 |
commit | 73d7e506331c4d94cf190afc8e971bfcaa8fcfee (patch) | |
tree | 2d7924022671484045c1371140b2db29a2a98ae8 /games | |
parent | fb89d0cbe5641bec1cbdcc4473fbccfe84b2f3ed (diff) |
save errno in sigchld handlers
Diffstat (limited to 'games')
-rw-r--r-- | games/sail/pl_1.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/games/sail/pl_1.c b/games/sail/pl_1.c index 0abd1ac3a7b..f215cd91ab6 100644 --- a/games/sail/pl_1.c +++ b/games/sail/pl_1.c @@ -130,7 +130,8 @@ child() { union wait status; int pid; - + int save_errno = errno; + (void) signal(SIGCHLD, SIG_IGN); do { pid = wait3((int *)&status, WNOHANG, (struct rusage *)0); @@ -138,4 +139,5 @@ child() hasdriver = 0; } while (pid > 0); (void) signal(SIGCHLD, child); + errno = save_errno; } |