From e3553ac6f82fa106cf1a394a5a613948efb968be Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Sun, 21 Aug 2016 14:36:24 +0100 Subject: [PATCH] kill.md: change signal explanation (closes #616) (#998) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add kill signal * 修改kill相关信号的注释 * kill.md: improve descriptions and formatting * kill.md: move dashes to outside the tokens --- pages/common/kill.md | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/pages/common/kill.md b/pages/common/kill.md index 13b54fe41..cdf3af39b 100644 --- a/pages/common/kill.md +++ b/pages/common/kill.md @@ -1,12 +1,28 @@ # kill -> Sends a signal to a process. -> Mostly used for stopping processes. +> Sends a signal to a process, usually related to stopping the process. +> All signals except for SIGKILL and SIGSTOP can be intercepted by the process to perform a clean exit. -- Kill the process: +- Terminate a program using the default SIGTERM (terminate) signal: `kill {{process_id}}` -- List signal names: +- List available signal names (to be used without the `SIG` prefix): `kill -l` + +- Terminate a program using the SIGHUP (hang up) signal. Many daemons will reload instead of terminating: + +`kill -{{1|HUP}} {{process_id}}` + +- Terminate a program using the SIGINT (interrupt) signal. This is typically initiated by the user pressing `Ctrl+C`: + +`kill -{{2|INT}} {{process_id}}` + +- Signal the operating system to immediately terminate a program (which gets no chance to capture the signal): + +`kill -{{9|KILL}} {{process_id}}` + +- Signal the operating system to pause a program, it until a SIGCONT ("continue") signal is received: + +`kill -{{17|STOP}} {{process_id}}`