printf("hello\n");}
int i;}
signal(SIGALRM,handler);
alarm(5);
for(i=1;i<7;i++){
printf("sleep %d ...\n",i);}
sleep(1);
pid_t pid;}
int status;
if(!(pid= fork())){
printf("Hi I am child process!\n");}
sleep(10);
return;
else{
printf("send signal to child process (%d) \n",pid);}
sleep(1);
kill(pid ,SIGABRT);
wait(&status);
if(WIFSIGNALED(status))
printf("chile process receive signal %d\n",WTERMSIG(status));
void (*sa_handler) (int);}
sigset_t sa_mask;
int sa_flags;
void (*sa_restorer) (void);
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |