Skip to content

Commit

Permalink
kill: split POSIX and util-linux implementations (#12044)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorhcl committed Jan 9, 2024
1 parent 6912203 commit 8c478fc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
6 changes: 1 addition & 5 deletions pages/common/kill.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> 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.
> More information: <https://manned.org/kill>.
> More information: <https://manned.org/kill.1posix>.
- Terminate a program using the default SIGTERM (terminate) signal:

Expand All @@ -12,10 +12,6 @@

`kill -l`

- Terminate a background job:

`kill %{{job_id}}`

- Terminate a program using the SIGHUP (hang up) signal. Many daemons will reload instead of terminating:

`kill -{{1|HUP}} {{process_id}}`
Expand Down
37 changes: 37 additions & 0 deletions pages/linux/kill.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# kill

> 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.
> More information: <https://manned.org/kill>.
- Terminate a program using the default SIGTERM (terminate) signal:

`kill {{process_id}}`

- List signal values and their corresponding names (to be used without the `SIG` prefix):

`kill -{{L|-table}}`

- Terminate a background job:

`kill %{{job_id}}`

- 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 until a SIGCONT ("continue") signal is received:

`kill -{{17|STOP}} {{process_id}}`

- Send a `SIGUSR1` signal to all processes with the given GID (group id):

`kill -{{SIGUSR1}} -{{group_id}}`

0 comments on commit 8c478fc

Please sign in to comment.