summaryrefslogtreecommitdiff
path: root/sbin/mount_portal/mount_portal.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 /sbin/mount_portal/mount_portal.c
parentfb89d0cbe5641bec1cbdcc4473fbccfe84b2f3ed (diff)
save errno in sigchld handlers
Diffstat (limited to 'sbin/mount_portal/mount_portal.c')
-rw-r--r--sbin/mount_portal/mount_portal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/mount_portal/mount_portal.c b/sbin/mount_portal/mount_portal.c
index 55911432ffa..a6f38b3a81c 100644
--- a/sbin/mount_portal/mount_portal.c
+++ b/sbin/mount_portal/mount_portal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_portal.c,v 1.11 1997/06/25 18:25:47 kstailey Exp $ */
+/* $OpenBSD: mount_portal.c,v 1.12 1997/08/04 19:25:19 deraadt Exp $ */
/* $NetBSD: mount_portal.c,v 1.8 1996/04/13 01:31:54 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ char copyright[] =
#if 0
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
#else
-static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.11 1997/06/25 18:25:47 kstailey Exp $";
+static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.12 1997/08/04 19:25:19 deraadt Exp $";
#endif
#endif /* not lint */
@@ -87,12 +87,14 @@ static void
sigchld(sig)
int sig;
{
+ int save_errno = errno;
pid_t pid;
while ((pid = waitpid((pid_t) -1, NULL, WNOHANG)) > 0)
;
if (pid < 0 && errno != ECHILD)
syslog(LOG_WARNING, "waitpid: %m");
+ errno = save_errno;
}
static void