diff options
author | Tor Egge <tegge@FreeBSD.org> | 1998-04-26 01:00:00 +0000 |
---|---|---|
committer | Tor Egge <tegge@FreeBSD.org> | 1998-04-26 01:00:00 +0000 |
commit | dae3e4e6037fcc0697a617b9ede53e4c05f93884 (patch) | |
tree | 923bb3c66bdd0188df221ddae6ce1d8ba5e2f2f8 /usr.sbin/portmap | |
parent | 9b473222be20b13961f2f14398a2780861b5607f (diff) |
Don't clobber errno when reaping child processes.
Notes
Notes:
svn path=/head/; revision=35455
Diffstat (limited to 'usr.sbin/portmap')
-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 56c1262a1e01..c77f76a829a6 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; } |