1 /* Ltrace Test : signals.c.
2 Objectives : Verify that ltrace can trace user defined signal.
3 This file was written by Yao Qi <qiyao@cn.ibm.com>. */
12 handler(int signum,siginfo_t *info,void *act)
14 /* Trace printf in signal handler. */
15 printf("sival_int = %d\n",info->si_value.sival_int);
22 union sigval mysigval;
29 /* Use an user-defined signal 1. */
33 sigemptyset(&act.sa_mask);
34 act.sa_sigaction=handler;
35 act.sa_flags=SA_SIGINFO;
37 if(sigaction(sig,&act,NULL) < 0)
39 printf("install sigal error\n");
45 sigqueue(pid,sig,mysigval);