summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--create.c3
-rw-r--r--pthread.h4
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a7109c8..e13ca49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,10 +10,9 @@
* create.c: #include <string.h> to get a prototype for memcpy().
(pthread_create): New threads inherit their creator's signal
- mask. Copy the signal mask to the new thread structure.
-
+ mask. Copy the signal mask to the new thread structure if we know
+ about signals.
-
Fri Jul 24 16:33:17 1998 Ross Johnson <rpj@swan.canberra.edu.au>
* fork.c (pthread_atfork): Add all the necessary push calls.
diff --git a/create.c b/create.c
index e8fd1c1..74d207d 100644
--- a/create.c
+++ b/create.c
@@ -86,7 +86,10 @@ pthread_create(pthread_t *thread,
attr_copy->canceltype = attr->canceltype;
attr_copy->detached = attr->detached;
attr_copy->priority = attr->priority;
+
+#if HAVE_SIGSET_T
memcpy(attr_copy.sigmask, attr.sigmask, sizeof(sigset_t));
+#endif /* HAVE_SIGSET_T */
}
/* Start running, not suspended. */
diff --git a/pthread.h b/pthread.h
index 43b9594..70ece60 100644
--- a/pthread.h
+++ b/pthread.h
@@ -22,6 +22,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _PTHREADS_H
#define _PTHREADS_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif /* HAVE_SIGNAL_H */