1 /* Test handle_group_exit () handling of a thread leader still alive with its
2 * thread child calling exit_group () and proper passing of the process exit
3 * code to the process parent of this whole thread group.
5 * gcc -o test/leaderkill test/leaderkill.c -Wall -ggdb2 -pthread;./test/leaderkill & pid=$!;sleep 1;strace -o x -q ./strace -f -p $pid
6 * It must print: write(1, "OK\n", ...
16 static void *start (void *arg)
38 i = pthread_create (&thread1, NULL, start, NULL);
40 /* Two possible testcases; the second one passed even in the older versions. */
50 got_pid = waitpid (child, &status, 0);
51 assert (got_pid == child);
52 assert (WIFEXITED (status));
53 assert (WEXITSTATUS (status) == 42);