我如何知道bash kill是使用pid还是jobspec?

ein*_*ica 8 syntax shell kill process sh

从精细的手册页:

kill [-s sigspec | -n signum | -sigspec] [pid | jobspec] ...
kill -l [sigspec | exit_status]
    Send  the  signal  named  by sigspec or signum to the processes named by pid or 
    jobspec.  sigspec is etc. etc....
Run Code Online (Sandbox Code Playgroud)

那么是什么决定是否kill 1杀死init进程或jobspec 1?

kof*_*ann 12

使用kill 1你将发送一个信号进行处理pid 1.要杀死作业1,你必须输入

  kill %1
Run Code Online (Sandbox Code Playgroud)

jobspec是%

  • 这有记录吗? (3认同)