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.
This commit is contained in:
parent
71fb61ca8d
commit
7bed39d5b2
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user