11 printf ("Received signal %d (%s).\n", sig, strsignal(sig));
18 if (signal (SIGTERM, handler) == SIG_ERR)
20 perror ("signal: SIGTERM");
24 puts ("Set handler.");
26 printf ("Sending myself signal %d.\n", SIGTERM);
29 if (raise (SIGTERM) < 0)
31 perror ("raise: SIGTERM");
37 puts ("Didn't get any signal. Test FAILED!");
41 puts ("Got a signal. Test succeeded.");