赞
踩
进程A给进程B发送信号,进程B收到信号之前先执行自己的代码,收到信号后,不管执行到程序的什么位置,都要暂停运行去处理信号,处理完毕后再继续执行。
信号有三种状态:产生,未决和递达。
信号的产生:
fg
命令将其恢复到前台继续执行,使用bg
命令将其放入后台继续执行。软件条件产生:如:定时器alarm(每一个进程都有一个唯一的定时器)
未决:产生和递达之间的状态。主要由于阻塞导致该状态
递达:递送并且到达进程。
默认动作有:
- Term Default action is to terminate the process.
- (终止进程)
- Ign Default action is to ignore the signal.
- (忽略该信号)
- Core Default action is to terminate the process and dump core (see
- core(5)). (内存非法访问)
-
- Stop Default action is to stop the process.
- (停止进程)
- Cont Default action is to continue the process if it is currently
- stopped. (进程继续执行)
The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。