switch (act->sa_flags)}
{
case SIG_DFL:printf("Default action\n");break;}
case SIG_IGN:printf("Ignore the signal\n");break;
default: printf("0x%x\n",act->sa_handler);
int i;}
struct sigaction act,oldact;
act.sa_handler = show_handler;
act.sa_flags = SA_ONESHOT|SA_NOMASK;
sigaction(SIGUSR1,&act,&oldact);
for(i=5;i<15;i++)
{
printf("sa_handler of signal %2d =".i);}
sigaction(i,NULL,&oldact);
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |