From: Karel Zak Date: Tue, 17 Jul 2007 09:44:34 +0000 (+0200) Subject: login-utils: remove deprecated sigsetmask() from wall X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ed485b571c3a58560eca2701e502d737143c61c;p=util-linux login-utils: remove deprecated sigsetmask() from wall The sigsetmask() is deprecated in favor of sigprocmask(). Signed-off-by: Karel Zak --- diff --git a/login-utils/ttymsg.c b/login-utils/ttymsg.c index 0dbe5811..24b74bcb 100644 --- a/login-utils/ttymsg.c +++ b/login-utils/ttymsg.c @@ -128,6 +128,7 @@ ttymsg(struct iovec *iov, int iovcnt, char *line, int tmout) { } if (errno == EWOULDBLOCK) { int cpid, flags; + sigset_t sigmask; if (forked) { (void) close(fd); @@ -153,7 +154,8 @@ ttymsg(struct iovec *iov, int iovcnt, char *line, int tmout) { /* wait at most tmout seconds */ (void) signal(SIGALRM, SIG_DFL); (void) signal(SIGTERM, SIG_DFL); /* XXX */ - (void) sigsetmask(0); + sigemptyset(&sigmask); + sigprocmask (SIG_SETMASK, &sigmask, NULL); (void) alarm((u_int)tmout); flags = fcntl(fd, F_GETFL); fcntl(flags, F_SETFL, (long) (flags & ~O_NONBLOCK));