summaryrefslogtreecommitdiffstats
path: root/login-utils/ttymsg.c
diff options
context:
space:
mode:
authorKarel Zak2007-07-17 11:44:34 +0200
committerKarel Zak2007-07-17 11:44:34 +0200
commit1ed485b571c3a58560eca2701e502d737143c61c (patch)
treed709b99290269407d891c8d77478e5d6b30753c0 /login-utils/ttymsg.c
parentfdisk: check returns in fdisk from partition changes (diff)
downloadkernel-qcow2-util-linux-1ed485b571c3a58560eca2701e502d737143c61c.tar.gz
kernel-qcow2-util-linux-1ed485b571c3a58560eca2701e502d737143c61c.tar.xz
kernel-qcow2-util-linux-1ed485b571c3a58560eca2701e502d737143c61c.zip
login-utils: remove deprecated sigsetmask() from wall
The sigsetmask() is deprecated in favor of sigprocmask(). Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/ttymsg.c')
-rw-r--r--login-utils/ttymsg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/login-utils/ttymsg.c b/login-utils/ttymsg.c
index 0dbe58113..24b74bcbc 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));