
信号
F_GSong
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
信号的捕捉和处理
推荐此博客,内容写得很详细,很适合自学信号http://blog.youkuaiyun.com/muge0913/article/details/7331129原创 2012-03-14 18:08:21 · 773 阅读 · 0 评论 -
信号捕捉预处理之不可重入函数
#include #include #include int temp = 0;void signal_handler(){printf("\nI get a signal \n");sleep(5);temp++;printf("\ntemp = %d\n",temp);}int main(){struct sigaction sig;原创 2012-03-14 21:51:09 · 766 阅读 · 0 评论 -
信号的捕捉和处理之signaction函数
函数原型: #include int sigaction(int signum,const struct sigaction *act,struct sigaction *oldact);sigaction会根据参数signum指定的信号编号来设置该信号的处理函数。参数signum可以是SIGKILL和SIGSTOP以外的任何信号。如果参数act不是空指针,则为signum设置新的信原创 2012-03-14 18:47:15 · 3095 阅读 · 0 评论 -
EINTR错误的产生
当进程阻塞于某个系统调用,而此时该进程接收到某个信号产生软中断,处理完信号处理函数是,该系统可能返回一个EINTR错误。原创 2012-03-17 23:34:08 · 1415 阅读 · 0 评论