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.bin/mail/popen.c | |
parent | fb89d0cbe5641bec1cbdcc4473fbccfe84b2f3ed (diff) |
save errno in sigchld handlers
Diffstat (limited to 'usr.bin/mail/popen.c')
-rw-r--r-- | usr.bin/mail/popen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/mail/popen.c b/usr.bin/mail/popen.c index 2de89722fe7..b542ae4d14c 100644 --- a/usr.bin/mail/popen.c +++ b/usr.bin/mail/popen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: popen.c,v 1.10 1997/07/14 16:09:07 millert Exp $ */ +/* $OpenBSD: popen.c,v 1.11 1997/08/04 19:25:50 deraadt Exp $ */ /* $NetBSD: popen.c,v 1.6 1997/05/13 06:48:42 mikel Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)popen.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: popen.c,v 1.10 1997/07/14 16:09:07 millert Exp $"; +static char rcsid[] = "$OpenBSD: popen.c,v 1.11 1997/08/04 19:25:50 deraadt Exp $"; #endif #endif /* not lint */ @@ -346,6 +346,7 @@ sigchild(signo) int pid; union wait status; register struct child *cp; + int save_errno = errno; while ((pid = wait3((int *)&status, WNOHANG, (struct rusage *)0)) > 0) { @@ -357,6 +358,7 @@ sigchild(signo) cp->status = status; } } + errno = save_errno; } union wait wait_status; |