From 02cd25bfe2935e8f98ce7742452435dede4d841a Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Thu, 4 Jun 1998 15:37:05 +0000 Subject: [PATCH] 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(-) diff --git a/usr.sbin/rpc.ypxfrd/ypxfrd_main.c b/usr.sbin/rpc.ypxfrd/ypxfrd_main.c index 516840959e2..ef24d337a53 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()