summaryrefslogtreecommitdiff
path: root/usr.bin/tn3270/sys_curses/system.c
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/tn3270/sys_curses/system.c
parentfb89d0cbe5641bec1cbdcc4473fbccfe84b2f3ed (diff)
save errno in sigchld handlers
Diffstat (limited to 'usr.bin/tn3270/sys_curses/system.c')
-rw-r--r--usr.bin/tn3270/sys_curses/system.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tn3270/sys_curses/system.c b/usr.bin/tn3270/sys_curses/system.c
index 429a52a9d19..00570365a83 100644
--- a/usr.bin/tn3270/sys_curses/system.c
+++ b/usr.bin/tn3270/sys_curses/system.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: system.c,v 1.5 1997/04/19 20:53:46 deraadt Exp $ */
+/* $OpenBSD: system.c,v 1.6 1997/08/04 19:25:59 deraadt Exp $ */
/*-
* Copyright (c) 1988 The Regents of the University of California.
@@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)system.c 4.5 (Berkeley) 4/26/91";*/
-static char rcsid[] = "$OpenBSD: system.c,v 1.5 1997/04/19 20:53:46 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: system.c,v 1.6 1997/08/04 19:25:59 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -592,6 +592,7 @@ shell_continue()
static void
child_died(code)
{
+ int save_errno = errno;
union wait status;
register int pid;
@@ -616,6 +617,7 @@ child_died(code)
}
}
signal(SIGCHLD, child_died);
+ errno = save_errno;
}