From 7bed39d5b2053d01862b272851fc487f7767ba11 Mon Sep 17 00:00:00 2001 From: wpaul Date: Thu, 4 Jun 1998 15:37:05 +0000 Subject: 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. --- usr.sbin/rpc.ypxfrd/ypxfrd_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'usr.sbin/rpc.ypxfrd/ypxfrd_main.c') 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() -- cgit v1.1