diff options
author | tegge <tegge@FreeBSD.org> | 1998-04-26 01:00:00 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1998-04-26 01:00:00 +0000 |
commit | 281bfe1bda6e50a925723bbcef0d1825c11ad866 (patch) | |
tree | a1f3a14a730b2fa1b98166a3fcc5e574930540cb | |
parent | de1c025be05885655cf304e0a67c3bc4502eb2c9 (diff) | |
download | FreeBSD-src-281bfe1bda6e50a925723bbcef0d1825c11ad866.zip FreeBSD-src-281bfe1bda6e50a925723bbcef0d1825c11ad866.tar.gz |
Don't clobber errno when reaping child processes.
-rw-r--r-- | usr.sbin/portmap/portmap.c | 7 |
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; } |