加入收藏 | 设为首页 | 会员中心 | 我要投稿 威海站长网 (https://www.0631zz.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Signal Handling--ref

发布时间:2021-01-25 08:01:09 所属栏目:Linux 来源:网络整理
导读:signal is a software interrupt delivered to a process. The operating system uses signals to report exceptional situations to an executing program. Some signals report errors such as references to invalid memory addresses; others report asy

The default action for this signal is to ignore it. If you establish a handler for this signal while there are child processes that have terminated but not reported their status viawaitorwaitpid(see section),whether your new handler applies to those processes or not depends on the particular operating system.

intSIGCLD
This is an obsolete name forSIGCHLD.
intSIGCONT
You can send aSIGCONTsignal to a process to make it continue. This signal is special--it always makes the process continue if it is stopped,before the signal is delivered. The default behavior is to do nothing else. You cannot block this signal. You can set a handler,butSIGCONTalways makes the process continue regardless.

Most programs have no reason to handleSIGCONT; they simply resume execution without realizing they were ever stopped. You can use a handler forSIGCONTto make a program do something special when it is stopped and continued--for example,to reprint a prompt when it is suspended while waiting for input.

intSIGSTOP
TheSIGSTOPsignal stops the process. It cannot be handled,ignored,or blocked.

intSIGTSTP
TheSIGTSTPsignal is an interactive stop signal. UnlikeSIGSTOP,this signal can be handled and ignored.

Your program should handle this signal if you have a special need to leave files or system tables in a secure state when a process is stopped. For example,programs that turn off echoing should handleSIGTSTPso they can turn echoing back on before stopping.

This signal is generated when the user types the SUSP character (normallyC-z). For more information about terminal driver support,see section.

intSIGTTIN
A process cannot read from the the user's terminal while it is running as a background job. When any process in a background job tries to read from the terminal,all of the processes in the job are sent aSIGTTINsignal. The default action for this signal is to stop the process. For more information about how this interacts with the terminal driver,see section.

(编辑:威海站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读