View | Details | Raw Unified | Return to bug 131080
Collapse All | Expand All

(-)Python/thread_pthread.h (+4 lines)
Lines 149-154 Link Here
149
{
149
{
150
	pthread_t th;
150
	pthread_t th;
151
	int status;
151
	int status;
152
	sigset_t set, oset;
152
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
153
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
153
	pthread_attr_t attrs;
154
	pthread_attr_t attrs;
154
#endif
155
#endif
Lines 178-183 Link Here
178
        pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
179
        pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
179
#endif
180
#endif
180
181
182
	sigfillset(&set);
183
	SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
181
	status = pthread_create(&th, 
184
	status = pthread_create(&th, 
182
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
185
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
183
				 &attrs,
186
				 &attrs,
Lines 187-192 Link Here
187
				 (void* (*)(void *))func,
190
				 (void* (*)(void *))func,
188
				 (void *)arg
191
				 (void *)arg
189
				 );
192
				 );
193
	SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
190
194
191
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
195
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
192
	pthread_attr_destroy(&attrs);
196
	pthread_attr_destroy(&attrs);

Return to bug 131080