summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.yppasswdd
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1998-06-04 15:11:32 +0000
committerwpaul <wpaul@FreeBSD.org>1998-06-04 15:11:32 +0000
commit6815553adff216ba86ce08e7d9fb7eaab9d0d93c (patch)
treef957355ad432f29e65b82c5710da172c850dcef0 /usr.sbin/rpc.yppasswdd
parent08171730deae1a1a06a766fed5954212dfa52d0d (diff)
downloadFreeBSD-src-6815553adff216ba86ce08e7d9fb7eaab9d0d93c.zip
FreeBSD-src-6815553adff216ba86ce08e7d9fb7eaab9d0d93c.tar.gz
Protect errno in signal handlers, like in portmap.
Diffstat (limited to 'usr.sbin/rpc.yppasswdd')
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_server.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
index f41cce2..5f57ce8 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
@@ -32,7 +32,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id$";
+ "$Id: yppasswdd_server.c,v 1.14 1997/10/13 11:18:53 charnier Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -70,6 +70,9 @@ void reaper(sig)
extern pid_t pid;
extern int pstat;
int st;
+ int saved_errno;
+
+ saved_errno = errno;
if (sig > 0) {
if (sig == SIGCHLD)
@@ -77,6 +80,8 @@ void reaper(sig)
} else {
pid = waitpid(pid, &pstat, 0);
}
+
+ errno = saved_errno;
return;
}
OpenPOWER on IntegriCloud