ftmemsim-valgrind/tests/sigwait_all.c
Julian Seward e61a13b92a Fix small bug causing assertion failure in computation of SKSS.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@316
2002-05-23 17:09:43 +00:00

24 lines
395 B
C

#include <stdio.h>
#include <pthread.h>
#include <signal.h>
int main ( void )
{
int res, sig;
sigset_t set;
sigfillset(&set);
/* block all signals */
pthread_sigmask(SIG_BLOCK, &set, NULL);
printf("send me a signal, any signal\n");
/* Wait for any signal in the set */
res = sigwait(&set, &sig);
printf("sigwait returned, res = %d, sig = %d\n", res, sig);
return 0;
}