]> err.no Git - util-linux/commitdiff
login-utils: remove deprecated sigsetmask() from wall
authorKarel Zak <kzak@redhat.com>
Tue, 17 Jul 2007 09:44:34 +0000 (11:44 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 17 Jul 2007 09:44:34 +0000 (11:44 +0200)
The sigsetmask() is deprecated in favor of sigprocmask().

Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/ttymsg.c

index 0dbe581130adf53bb753bbceb9f24a3b0d0a524e..24b74bcbc5d0ad998a55336e94db31d6ed083be5 100644 (file)
@@ -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));