From 1ed485b571c3a58560eca2701e502d737143c61c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 17 Jul 2007 11:44:34 +0200 Subject: [PATCH] login-utils: remove deprecated sigsetmask() from wall The sigsetmask() is deprecated in favor of sigprocmask(). Signed-off-by: Karel Zak --- login-utils/ttymsg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); -- 2.39.5