kill 关闭进程命令

发布时间: 更新时间: 总字数:210 阅读时间:1m 作者: IP上海 分享 网址

Linux kill 命令用于删除执行中的程序。


kill [-s <信号量名称>|-n <编号>] [pid]
$ kill --help
kill: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
    Send a signal to a job.

    Send the processes identified by PID or JOBSPEC the signal named by
    SIGSPEC or SIGNUM.  If neither SIGSPEC nor SIGNUM is present, then
    SIGTERM is assumed.

      -s sig	SIG is a signal name
      -n sig	SIG is a signal number
      -l	list the signal names; if arguments follow `-l' they are
    		assumed to be signal numbers for which names should be listed
      -L	synonym for -l

    Kill is a shell builtin for two reasons: it allows job IDs to be used
    instead of process IDs, and allows processes to be killed if the limit
    on processes that you can create is reached.

    Exit Status:
    Returns success unless an invalid option is given or an error occurs.


参考:Linux Signal 信号量介绍和示例

Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数