summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1998-04-26 01:00:00 +0000
committertegge <tegge@FreeBSD.org>1998-04-26 01:00:00 +0000
commit281bfe1bda6e50a925723bbcef0d1825c11ad866 (patch)
treea1f3a14a730b2fa1b98166a3fcc5e574930540cb /usr.sbin
parentde1c025be05885655cf304e0a67c3bc4502eb2c9 (diff)
downloadFreeBSD-src-281bfe1bda6e50a925723bbcef0d1825c11ad866.zip
FreeBSD-src-281bfe1bda6e50a925723bbcef0d1825c11ad866.tar.gz
Don't clobber errno when reaping child processes.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/portmap/portmap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/portmap/portmap.c b/usr.sbin/portmap/portmap.c
index 56c1262..c77f76a 100644
--- a/usr.sbin/portmap/portmap.c
+++ b/usr.sbin/portmap/portmap.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)portmap.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: portmap.c,v 1.6 1997/10/09 07:17:15 charnier Exp $";
#endif /* not lint */
/*
@@ -85,6 +85,7 @@ static char sccsid[] = "@(#)portmap.c 1.32 87/08/06 Copyr 1984 Sun Micro";
*/
#include <err.h>
+#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
@@ -604,5 +605,9 @@ callit(rqstp, xprt)
void
reap()
{
+ int save_errno;
+
+ save_errno = errno;
while (wait3((int *)NULL, WNOHANG, (struct rusage *)NULL) > 0);
+ errno = save_errno;
}
OpenPOWER on IntegriCloud