[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/10] pselect: Use pthread_sigmask, not sigprocmask.
From: |
Paul Eggert |
Subject: |
[PATCH 08/10] pselect: Use pthread_sigmask, not sigprocmask. |
Date: |
Wed, 06 Jul 2011 00:58:51 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10 |
* lib/pselect.c (pselect): Use pthread_sigmask, as it supports
multithreaded apps better than sigprocmask does.
* modules/pselect (Depends-on): Depend on pthread_sigmask, not
sigprocmask directly.
---
ChangeLog | 8 ++++++++
lib/pselect.c | 4 ++--
modules/pselect | 1 +
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ba7d0e4..bea73df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-07-06 Paul Eggert <address@hidden>
+
+ pselect: Use pthread_sigmask, not sigprocmask.
+ * lib/pselect.c (pselect): Use pthread_sigmask, as it supports
+ multithreaded apps better than sigprocmask does.
+ * modules/pselect (Depends-on): Depend on pthread_sigmask, not
+ sigprocmask directly.
+
2011-07-05 Paul Eggert <address@hidden>
* lib/pselect.c (pselect): Use plain name, without "rpl_".
diff --git a/lib/pselect.c b/lib/pselect.c
index 6b9ba22..5b709a2 100644
--- a/lib/pselect.c
+++ b/lib/pselect.c
@@ -62,14 +62,14 @@ pselect (int nfds, fd_set *restrict rfds,
/* Signal mask munging should be atomic, but this is the best we can
do in this emulation. */
if (sigmask)
- sigprocmask (SIG_SETMASK, sigmask, &origmask);
+ pthread_sigmask (SIG_SETMASK, sigmask, &origmask);
select_result = select (nfds, rfds, wfds, xfds, tvp);
if (sigmask)
{
int select_errno = errno;
- sigprocmask (SIG_SETMASK, &origmask, NULL);
+ pthread_sigmask (SIG_SETMASK, &origmask, NULL);
errno = select_errno;
}
diff --git a/modules/pselect b/modules/pselect
index 0ed5d8b..73c1e9f 100644
--- a/modules/pselect
+++ b/modules/pselect
@@ -7,6 +7,7 @@ m4/pselect.m4
Depends-on:
sys_select
+pthread_sigmask [test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1]
select [test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1]
configure.ac:
--
1.7.4.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 08/10] pselect: Use pthread_sigmask, not sigprocmask.,
Paul Eggert <=