summaryrefslogtreecommitdiff
path: root/usr.sbin/rbootd/rbootd.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-09-04 23:36:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-09-04 23:36:00 +0000
commit6e69b2a3e9a34411460d33a432a805b3eb1924d1 (patch)
tree33cfe52f5da9645a00ca15af49ceefdd612696d2 /usr.sbin/rbootd/rbootd.c
parent102264589c8731b5f0fb00b204e5963726ecec83 (diff)
Replace the deprecated BSD sigsetmask/sigblock/sigpause functions with their POSIX counterparts.
Diffstat (limited to 'usr.sbin/rbootd/rbootd.c')
-rw-r--r--usr.sbin/rbootd/rbootd.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/usr.sbin/rbootd/rbootd.c b/usr.sbin/rbootd/rbootd.c
index 649d6e94680..b55afe53670 100644
--- a/usr.sbin/rbootd/rbootd.c
+++ b/usr.sbin/rbootd/rbootd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbootd.c,v 1.7 2001/01/19 17:53:18 deraadt Exp $ */
+/* $OpenBSD: rbootd.c,v 1.8 2001/09/04 23:35:59 millert Exp $ */
/* $NetBSD: rbootd.c,v 1.5 1995/10/06 05:12:17 thorpej Exp $ */
/*
@@ -55,7 +55,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)rbootd.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$OpenBSD: rbootd.c,v 1.7 2001/01/19 17:53:18 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rbootd.c,v 1.8 2001/09/04 23:35:59 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -79,8 +79,9 @@ main(argc, argv)
int argc;
char *argv[];
{
- int c, fd, omask, maxfds;
+ int c, fd, maxfds;
fd_set rset;
+ sigset_t hmask, omask;
/*
* Close any open file descriptors.
@@ -201,7 +202,9 @@ main(argc, argv)
/*
* Initial configuration.
*/
- omask = sigblock(sigmask(SIGHUP)); /* prevent reconfig's */
+ sigemptyset(&hmask);
+ sigaddset(&hmask, SIGHUP);
+ sigprocmask(SIG_BLOCK, &hmask, &omask); /* prevent reconfig's */
if (GetBootFiles() == 0) /* get list of boot files */
Exit(0);
if (ParseConfig() == 0) /* parse config file */
@@ -214,7 +217,7 @@ main(argc, argv)
*/
fd = BpfOpen();
- (void) sigsetmask(omask); /* allow reconfig's */
+ sigprocmask(SIG_SETMASK, &omask, NULL); /* allow reconfig's */
/*
* Main loop: receive a packet, determine where it came from,
@@ -259,7 +262,7 @@ main(argc, argv)
if (DbgFp != NULL) /* display packet */
DispPkt(&rconn,DIR_RCVD);
- omask = sigblock(sigmask(SIGHUP));
+ sigprocmask(SIG_BLOCK, &hmask, &omask);
/*
* If we do not restrict service, set the
@@ -274,13 +277,13 @@ main(argc, argv)
syslog(LOG_INFO,
"%s: boot packet ignored",
EnetStr(&rconn));
- (void) sigsetmask(omask);
+ sigprocmask(SIG_SETMASK, &omask, NULL);
continue;
}
ProcessPacket(&rconn,client);
- (void) sigsetmask(omask);
+ sigprocmask(SIG_SETMASK, &omask, NULL);
}
}
}