在中man page,它说:
kill [ -s signal | -p ] [ -a ] [ -- ] pid ...
pid... Specify the list of processes that kill should signal. Each pid can be one of five things:
0 All processes in the current process group are signaled
我在bash中尝试过这样:
$ man kill &
[1] 15247
$
[1]+ Stopped man kill
$ kill 0
$ ps
15247 pts/41 00:00:00 man
这里0用作pid。据我了解,kill 0它将杀死当前进程中的所有进程,其中包括pid15247。但是,在此示例中它什么也没做。有人对使用它有想法吗?
ps -j以查看过程组。
kill -0(注意破折号)的问题,这是一个不同的主题。
SIGTERM完成的过程发送一个。该man命令已选择忽略它。