45

linux信号解释(5)--bash下的理解-Linux菜鸟

 6 years ago
source link: http://blog.51cto.com/lythjq/2083304
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
上一节中用了C语言来理解信号的处理,那么在bash中是如何理解的呢?首先我们来认识一下trap命令#typetrapo_o原来是一个shell的内建命令,大家能想想为何是内建命令吗?sh是人机对话的接口,我们发起的命令都会通过sh与内核进行打交道,那么在当前sh进程内就能及时完成信号的捕捉和处理。好了我们回到bash中如何理解呢?我们还是用回上一节的实例来做,创建一个signalshell.sh文

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK