diff options
author | eivind <eivind@FreeBSD.org> | 1997-10-07 16:43:16 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1997-10-07 16:43:16 +0000 |
commit | 5e2703d7ee0879847269df432ef3737ec99b2bd8 (patch) | |
tree | b11bc249567dcdc3dceb2940b9605f8db462e700 | |
parent | de07534fa8f6497ed4c5c1eb00efad4d66e31b12 (diff) | |
download | FreeBSD-src-5e2703d7ee0879847269df432ef3737ec99b2bd8.zip FreeBSD-src-5e2703d7ee0879847269df432ef3737ec99b2bd8.tar.gz |
save errno in sigchld handler
Obtained from: Theo deRaadt <theo@openbsd.org> (OpenBSD rev 1.6)
-rw-r--r-- | bin/csh/proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/csh/proc.c b/bin/csh/proc.c index 70c42a3..eb10e79 100644 --- a/bin/csh/proc.c +++ b/bin/csh/proc.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)proc.c 8.1 (Berkeley) 5/31/93"; #else static const char rcsid[] = - "$Id: proc.c,v 1.5 1997/08/07 21:42:15 steve Exp $"; + "$Id: proc.c,v 1.6 1997/08/08 00:54:05 steve Exp $"; #endif #endif /* not lint */ @@ -89,6 +89,7 @@ pchild(notused) struct process *fp; int pid; extern int insource; + int save_errno = errno; union wait w; int jobflags; struct rusage ru; @@ -104,6 +105,7 @@ loop: goto loop; } pnoprocesses = pid == -1; + errno = save_errno; return; } for (pp = proclist.p_next; pp != NULL; pp = pp->p_next) |