summaryrefslogtreecommitdiff
path: root/usr.bin/script
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-08-04 19:26:26 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-08-04 19:26:26 +0000
commit73d7e506331c4d94cf190afc8e971bfcaa8fcfee (patch)
tree2d7924022671484045c1371140b2db29a2a98ae8 /usr.bin/script
parentfb89d0cbe5641bec1cbdcc4473fbccfe84b2f3ed (diff)
save errno in sigchld handlers
Diffstat (limited to 'usr.bin/script')
-rw-r--r--usr.bin/script/script.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c
index cb7cbb3b243..d24277c2868 100644
--- a/usr.bin/script/script.c
+++ b/usr.bin/script/script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: script.c,v 1.7 1997/07/25 22:03:08 mickey Exp $ */
+/* $OpenBSD: script.c,v 1.8 1997/08/04 19:25:56 deraadt Exp $ */
/* $NetBSD: script.c,v 1.3 1994/12/21 08:55:43 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: script.c,v 1.7 1997/07/25 22:03:08 mickey Exp $";
+static char rcsid[] = "$OpenBSD: script.c,v 1.8 1997/08/04 19:25:56 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -156,6 +156,7 @@ finish(signo)
int signo;
{
register int die, pid;
+ int save_errno = errno;
union wait status;
die = 0;
@@ -165,6 +166,7 @@ finish(signo)
if (die)
done();
+ errno = save_errno;
}
void