1 inline SigAction * Action(int signo, SigAction *func)
3 struct sigaction new_handl, old_handl;
4 new_handl.sa_flags=SA_SIGINFO; /* we use sa_sigaction handler */
5 new_handl.sa_sigaction = func; /* set signal handler */
6 /* clear signal mask: no signal blocked during execution of func */
7 if (sigemptyset(&new_handl.sa_mask)!=0){ /* initialize signal set */
10 /* change action for signo signal */
11 if (sigaction(signo, &new_handl, &old_handl)){
14 return (old_handl.sa_sigaction);