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.bin/wall/ttymsg.c | |
parent | 102264589c8731b5f0fb00b204e5963726ecec83 (diff) |
Replace the deprecated BSD sigsetmask/sigblock/sigpause functions with their POSIX counterparts.
Diffstat (limited to 'usr.bin/wall/ttymsg.c')
-rw-r--r-- | usr.bin/wall/ttymsg.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/wall/ttymsg.c b/usr.bin/wall/ttymsg.c index f49fdec4912..00ff4b545f9 100644 --- a/usr.bin/wall/ttymsg.c +++ b/usr.bin/wall/ttymsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttymsg.c,v 1.6 1998/11/18 16:47:01 deraadt Exp $ */ +/* $OpenBSD: ttymsg.c,v 1.7 2001/09/04 23:35:59 millert Exp $ */ /* $NetBSD: ttymsg.c,v 1.3 1994/11/17 07:17:55 jtc Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)ttymsg.c 8.2 (Berkeley) 11/16/93"; #endif -static char rcsid[] = "$OpenBSD: ttymsg.c,v 1.6 1998/11/18 16:47:01 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ttymsg.c,v 1.7 2001/09/04 23:35:59 millert Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -74,6 +74,7 @@ ttymsg(iov, iovcnt, line, tmout) struct iovec localiov[6]; int forked = 0; struct stat st; + sigset_t mask; if (iovcnt > sizeof(localiov) / sizeof(localiov[0])) return ("too many iov's (change code in wall/ttymsg.c)"); @@ -159,7 +160,8 @@ ttymsg(iov, iovcnt, line, tmout) /* wait at most tmout seconds */ (void) signal(SIGALRM, SIG_DFL); (void) signal(SIGTERM, SIG_DFL); /* XXX */ - (void) sigsetmask(0); + (void) sigemptyset(&mask); + (void) sigprocmask(SIG_SETMASK, &mask, NULL); (void) alarm((u_int)tmout); (void) fcntl(fd, O_NONBLOCK, &off); continue; |