1 /* Derived from the test case in
2 http://sourceware.org/bugzilla/show_bug.cgi?id=838. */
12 sig_handler (int signum
)
14 pid_t child
= fork ();
17 TEMP_FAILURE_RETRY (waitpid (child
, NULL
, 0));
23 pid_t parent
= getpid ();
25 struct sigaction action
= { .sa_handler
= sig_handler
};
26 sigemptyset (&action
.sa_mask
);
28 malloc (sizeof (int));
30 if (sigaction (SIGALRM
, &action
, NULL
) != 0)
32 puts ("sigaction failed");
36 /* Create a child that sends the signal to be caught. */
37 pid_t child
= fork ();
40 if (kill (parent
, SIGALRM
) == -1)
45 TEMP_FAILURE_RETRY (waitpid (child
, NULL
, 0));
50 #define TEST_FUNCTION do_test ()
51 #include "../test-skeleton.c"