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 /usr.sbin/pcmciad/pcmciad.c | |
parent | fb89d0cbe5641bec1cbdcc4473fbccfe84b2f3ed (diff) |
save errno in sigchld handlers
Diffstat (limited to 'usr.sbin/pcmciad/pcmciad.c')
-rw-r--r-- | usr.sbin/pcmciad/pcmciad.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/pcmciad/pcmciad.c b/usr.sbin/pcmciad/pcmciad.c index b744928ca5b..c204ac08c9b 100644 --- a/usr.sbin/pcmciad/pcmciad.c +++ b/usr.sbin/pcmciad/pcmciad.c @@ -450,10 +450,14 @@ child_death(sig) int sig; { int status; + int save_errno = errno; + if (wait(&status) == -1) { syslog(LOG_ERR, "wait error for signaled child: %m"); + errno = save_errno; return; } if (WEXITSTATUS(status) == 2) speaker_ok = 0; + errno = save_errno; } |