From 222716fdf0ed82862be02c7cae04bd226d6c6208 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 29 Dec 2015 19:14:42 +0100 Subject: use pthread_sigmask, not sigprocmask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/unistd/preadn.c | 6 +++--- src/unistd/pwriten.c | 6 +++--- src/unistd/readn.c | 6 +++--- src/unistd/writen.c | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/unistd/preadn.c b/src/unistd/preadn.c index d7da108..3940927 100644 --- a/src/unistd/preadn.c +++ b/src/unistd/preadn.c @@ -49,7 +49,7 @@ ssize_t preadn(int fd, void* buf, size_t nbyte, off_t offset) int saved_errno = 0; sigfillset(&mask); - sigprocmask(SIG_BLOCK, &mask, &oldmask); + pthread_sigmask(SIG_BLOCK, &mask, &oldmask); while (nbyte) { @@ -64,11 +64,11 @@ ssize_t preadn(int fd, void* buf, size_t nbyte, off_t offset) buffer += r; } - sigprocmask(SIG_SETMASK, &oldmask, NULL); + pthread_sigmask(SIG_SETMASK, &oldmask, NULL); return n; fail: errno = saved_errno; - sigprocmask(SIG_SETMASK, &oldmask, NULL); + pthread_sigmask(SIG_SETMASK, &oldmask, NULL); saved_errno = errno; return -1; } diff --git a/src/unistd/pwriten.c b/src/unistd/pwriten.c index fefe537..91deb37 100644 --- a/src/unistd/pwriten.c +++ b/src/unistd/pwriten.c @@ -49,7 +49,7 @@ ssize_t pwriten(int fd, const void* buf, size_t nbyte, off_t offset) int saved_errno = 0; sigfillset(&mask); - sigprocmask(SIG_BLOCK, &mask, &oldmask); + pthread_sigmask(SIG_BLOCK, &mask, &oldmask); while (nbyte) { @@ -64,11 +64,11 @@ ssize_t pwriten(int fd, const void* buf, size_t nbyte, off_t offset) buffer += r; } - sigprocmask(SIG_SETMASK, &oldmask, NULL); + pthread_sigmask(SIG_SETMASK, &oldmask, NULL); return n; fail: errno = saved_errno; - sigprocmask(SIG_SETMASK, &oldmask, NULL); + pthread_sigmask(SIG_SETMASK, &oldmask, NULL); saved_errno = errno; return -1; } diff --git a/src/unistd/readn.c b/src/unistd/readn.c index b50abe5..e607f8d 100644 --- a/src/unistd/readn.c +++ b/src/unistd/readn.c @@ -48,7 +48,7 @@ ssize_t readn(int fd, void* buf, size_t nbyte) int saved_errno = 0; sigfillset(&mask); - sigprocmask(SIG_BLOCK, &mask, &oldmask); + pthread_sigmask(SIG_BLOCK, &mask, &oldmask); while (nbyte) { @@ -62,11 +62,11 @@ ssize_t readn(int fd, void* buf, size_t nbyte) buffer += r; } - sigprocmask(SIG_SETMASK, &oldmask, NULL); + pthread_sigmask(SIG_SETMASK, &oldmask, NULL); return n; fail: errno = saved_errno; - sigprocmask(SIG_SETMASK, &oldmask, NULL); + pthread_sigmask(SIG_SETMASK, &oldmask, NULL); saved_errno = errno; return -1; } diff --git a/src/unistd/writen.c b/src/unistd/writen.c index 8082b00..3698d8a 100644 --- a/src/unistd/writen.c +++ b/src/unistd/writen.c @@ -48,7 +48,7 @@ ssize_t writen(int fd, const void* buf, size_t nbyte); int saved_errno = 0; sigfillset(&mask); - sigprocmask(SIG_BLOCK, &mask, &oldmask); + pthread_sigmask(SIG_BLOCK, &mask, &oldmask); while (nbyte) { @@ -62,11 +62,11 @@ ssize_t writen(int fd, const void* buf, size_t nbyte); buffer += r; } - sigprocmask(SIG_SETMASK, &oldmask, NULL); + pthread_sigmask(SIG_SETMASK, &oldmask, NULL); return n; fail: errno = saved_errno; - sigprocmask(SIG_SETMASK, &oldmask, NULL); + pthread_sigmask(SIG_SETMASK, &oldmask, NULL); saved_errno = errno; return -1; } -- cgit v1.2.3-70-g09d2