diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-09-04 23:36:00 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-09-04 23:36:00 +0000 |
commit | 6e69b2a3e9a34411460d33a432a805b3eb1924d1 (patch) | |
tree | 33cfe52f5da9645a00ca15af49ceefdd612696d2 /usr.sbin/rbootd/parseconf.c | |
parent | 102264589c8731b5f0fb00b204e5963726ecec83 (diff) |
Replace the deprecated BSD sigsetmask/sigblock/sigpause functions with their POSIX counterparts.
Diffstat (limited to 'usr.sbin/rbootd/parseconf.c')
-rw-r--r-- | usr.sbin/rbootd/parseconf.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/rbootd/parseconf.c b/usr.sbin/rbootd/parseconf.c index b40b0dac057..db927d08f6e 100644 --- a/usr.sbin/rbootd/parseconf.c +++ b/usr.sbin/rbootd/parseconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parseconf.c,v 1.4 2001/01/17 00:33:03 pjanzen Exp $ */ +/* $OpenBSD: parseconf.c,v 1.5 2001/09/04 23:35:59 millert Exp $ */ /* $NetBSD: parseconf.c,v 1.4 1995/10/06 05:12:16 thorpej Exp $ */ /* @@ -49,7 +49,7 @@ #ifndef lint /*static char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93";*/ -static char rcsid[] = "$OpenBSD: parseconf.c,v 1.4 2001/01/17 00:33:03 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: parseconf.c,v 1.5 2001/09/04 23:35:59 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -90,7 +90,8 @@ ParseConfig() char line[C_LINELEN]; register char *cp, *bcp; register int i, j; - int omask, linecnt = 0; + int linecnt = 0; + sigset_t mask, omask; if (BootAny) /* ignore config file */ return(1); @@ -110,7 +111,9 @@ ParseConfig() * this could have unexpected results if the server was HUP'd * whilst reconfiguring. Hence, it is done here. */ - omask = sigblock(sigmask(SIGHUP)); + sigemptyset(&mask); + sigaddset(&mask, SIGHUP); + sigprocmask(SIG_BLOCK, &mask, &omask); /* * GETSTR positions `bcp' at the start of the current token, @@ -212,7 +215,7 @@ ParseConfig() (void) fclose(fp); /* close config file */ - (void) sigsetmask(omask); /* reset signal mask */ + sigprocmask(SIG_SETMASK, &omask, NULL); /* reset signal mask */ return(1); /* return success */ } |