From 73d7e506331c4d94cf190afc8e971bfcaa8fcfee Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 4 Aug 1997 19:26:26 +0000 Subject: save errno in sigchld handlers --- bin/csh/proc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin/csh/proc.c') diff --git a/bin/csh/proc.c b/bin/csh/proc.c index b1ea8ec44a1..1e1f52838f9 100644 --- a/bin/csh/proc.c +++ b/bin/csh/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.5 1997/07/25 18:58:15 mickey Exp $ */ +/* $OpenBSD: proc.c,v 1.6 1997/08/04 19:24:02 deraadt Exp $ */ /* $NetBSD: proc.c,v 1.9 1995/04/29 23:21:33 mycroft Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)proc.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: proc.c,v 1.5 1997/07/25 18:58:15 mickey Exp $"; +static char rcsid[] = "$OpenBSD: proc.c,v 1.6 1997/08/04 19:24:02 deraadt Exp $"; #endif #endif /* not lint */ @@ -92,6 +92,7 @@ pchild(notused) register struct process *fp; register int pid; extern int insource; + int save_errno = errno; union wait w; int jobflags; struct rusage ru; @@ -107,6 +108,7 @@ loop: goto loop; } pnoprocesses = pid == -1; + errno = save_errno; return; } for (pp = proclist.p_next; pp != NULL; pp = pp->p_next) -- cgit v1.2.3