摘要: 主要调用singal()捕捉信号,指定函数处理#include <stdio.h>#include <sys/wait.h>#include <string.h>#include <errno.h>#define MAXLINE 20static void sig_int(int);int main(void){ char buf[MAXLINE]; /* from apue.h */ pid_t pid; int status; //捕捉信号 if(signal(SIGINT, sig_int) == SIG_ERR) ... 阅读全文
posted @ 2011-11-14 07:12 xiangzi888 阅读(337) 评论(0) 推荐(0) 编辑