summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1998-06-04 15:37:05 +0000
committerwpaul <wpaul@FreeBSD.org>1998-06-04 15:37:05 +0000
commit7bed39d5b2053d01862b272851fc487f7767ba11 (patch)
tree71d94cca5cc81617004be54543dee84462761796 /usr.sbin/rpc.ypxfrd/ypxfrd_main.c
parent71fb61ca8d331f3d1da836ac301323c749f5a2c6 (diff)
downloadFreeBSD-src-7bed39d5b2053d01862b272851fc487f7767ba11.zip
FreeBSD-src-7bed39d5b2053d01862b272851fc487f7767ba11.tar.gz
Darnit, that last commit was only supposed to change files in the
-current branch. I mistakenly checked out the 2.2.x rpc.ypxfrd into my -current working directory. No harm done, but I got really confused when I went to check out rpc.ypxfrd again and found the changes I wanted to make were already there. (I'm going to fix the other 2.2.x versions of the other programs in a minute.) Anyway: protect errno in the signal handler, in the -current version of rpc.ypxfrd this time.
Diffstat (limited to 'usr.sbin/rpc.ypxfrd/ypxfrd_main.c')
-rw-r--r--usr.sbin/rpc.ypxfrd/ypxfrd_main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/rpc.ypxfrd/ypxfrd_main.c b/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
index 5168409..ef24d33 100644
--- a/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
+++ b/usr.sbin/rpc.ypxfrd/ypxfrd_main.c
@@ -32,7 +32,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id$";
+ "$Id: ypxfrd_main.c,v 1.6 1997/10/13 11:22:37 charnier Exp $";
#endif /* not lint */
#include "ypxfrd.h"
@@ -161,10 +161,14 @@ ypxfrd_svc_run()
static void reaper(sig)
int sig;
{
- int status;
+ int status;
+ int saved_errno;
+
+ saved_errno = errno;
if (sig == SIGHUP) {
load_securenets();
+ errno = saved_errno;
return;
}
@@ -175,6 +179,9 @@ static void reaper(sig)
(void) pmap_unset(YPXFRD_FREEBSD_PROG, YPXFRD_FREEBSD_VERS);
exit(0);
}
+
+ errno = saved_errno;
+ return;
}
void usage()
OpenPOWER on IntegriCloud