相关疑难解决方法(0)

kill 0 实际上是做什么的?

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
Run Code Online (Sandbox Code Playgroud)

我在 bash 中尝试这样:

$ man kill &
[1] 15247
$
[1]+  Stopped                 man kill
$ kill 0
$ ps
15247 pts/41   00:00:00 man
Run Code Online (Sandbox Code Playgroud)

这里0用作pid. 据我了解,kill 0将杀死当前进程中的所有进程,其中包括pid15247 …

process kill process-groups

25
推荐指数
1
解决办法
2万
查看次数

标签 统计

kill ×1

process ×1

process-groups ×1