Forráskód Böngészése

fix clobbering of signal mask when creating thread with sched attributes

this was simply a case of saving the state in the wrong place.
Rich Felker 12 éve
szülő
commit
082fb4e9bf
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/thread/pthread_create.c

+ 1 - 1
src/thread/pthread_create.c

@@ -197,7 +197,7 @@ int pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict attrp
 	if (attr._a_sched) {
 		do_sched = new->startlock[0] = 1;
 		__syscall(SYS_rt_sigprocmask, SIG_BLOCK,
-			SIGALL_SET, self->sigmask, _NSIG/8);
+			SIGALL_SET, new->sigmask, _NSIG/8);
 	}
 	new->unblock_cancel = self->cancel;
 	new->canary = self->canary;