什么是'杀-0 $ pid`在shell脚本呢? [英] What does `kill -0 $pid` in a shell script do?
本文介绍了什么是'杀-0 $ pid`在shell脚本呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
基本上,信号是'0'重新present,因为的 我看到从1开始的信号编号
Basically, what signal does '0' represent, because here I see SIGNAL numbers starting from 1.
推荐答案
发送信号 0
给定的 PID
只是检查是否有任何进程给定的 PID
运行,你必须发出一个信号,它的权限。
sending the signal 0
to a given PID
just checks if any process with the given PID
is running and you have the permission to send a signal to it.
有关详细信息,请参阅下列联机帮助页:
For more information see the following manpages:
$ man 1 kill
...
If sig is 0, then no signal is sent, but error checking is still performed.
...
的杀(2)的
$ man 2 kill
...
If sig is 0, then no signal is sent, but error checking is still performed; this
can be used to check for the existence of a process ID or process group ID.
...
这篇关于什么是'杀-0 $ pid`在shell脚本呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文