1*4b169a6bSchristos /* Check that TRT happens when getting a non-standard (realtime) signal, more than one thread. 2*4b169a6bSchristos #progos: linux 3*4b169a6bSchristos #cc: additional_flags=-pthread 4*4b169a6bSchristos #xerror: 5*4b169a6bSchristos #output: Unimplemented signal: 77\n 6*4b169a6bSchristos #output: program stopped with signal 4 (*).\n 7*4b169a6bSchristos */ 8*4b169a6bSchristos 9*4b169a6bSchristos #include <stdlib.h> 10*4b169a6bSchristos #include <stddef.h> 11*4b169a6bSchristos #include <stdio.h> 12*4b169a6bSchristos #include <unistd.h> 13*4b169a6bSchristos #include <pthread.h> 14*4b169a6bSchristos #include <sys/types.h> 15*4b169a6bSchristos #include <signal.h> 16*4b169a6bSchristos 17*4b169a6bSchristos static void * process(void * arg)18*4b169a6bSchristosprocess (void *arg) 19*4b169a6bSchristos { 20*4b169a6bSchristos while (1) 21*4b169a6bSchristos sched_yield (); 22*4b169a6bSchristos return NULL; 23*4b169a6bSchristos } 24*4b169a6bSchristos main(void)25*4b169a6bSchristosint main (void) 26*4b169a6bSchristos { 27*4b169a6bSchristos pthread_t th_a; 28*4b169a6bSchristos if (pthread_create (&th_a, NULL, process, (void *) "a") == 0) 29*4b169a6bSchristos kill (getpid (), 77); 30*4b169a6bSchristos printf ("xyzzy\n"); 31*4b169a6bSchristos exit (0); 32*4b169a6bSchristos } 33