9 这个shell命令在做什么? trap 'sudo kill -9 -- -$$' EXIT 来源 2013-04-11 rhinoinrepose +3 要人们试图关闭此为题外话:这是一个关于shell脚本的问题 - 这是关于如何将shell程序。有关编程的问题*** [主题] ***(http://stackoverflow.com/faq)。 – 2013-04-11 19:09:05 +0 虽然使用'kill -9'基本上总是一个坏主意。请参阅http://www.iki.fi/era/unix/award.html#kill – tripleee 2015-10-22 19:16:25
6 $$是本身 -$$装置使用过程中组ID --的脚本的过程的ID信号的选项的结束 所以在退出时trap将杀脚本的所有子进程。 § Internal Variables 来源 2013-04-11 19:05:06
要人们试图关闭此为题外话:这是一个关于shell脚本的问题 - 这是关于如何将shell程序。有关编程的问题*** [主题] ***(http://stackoverflow.com/faq)。 – 2013-04-11 19:09:05
虽然使用'kill -9'基本上总是一个坏主意。请参阅http://www.iki.fi/era/unix/award.html#kill – tripleee 2015-10-22 19:16:25