mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC2173 (markdown)
19
SC2173.md
Normal file
19
SC2173.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
## SIGKILL/SIGSTOP can not be trapped.
|
||||||
|
|
||||||
|
### Problematic code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
trap 'echo "unkillable"' KILL
|
||||||
|
```
|
||||||
|
|
||||||
|
### Correct code:
|
||||||
|
|
||||||
|
Not applicable. This is not possible.
|
||||||
|
|
||||||
|
### Rationale:
|
||||||
|
|
||||||
|
SIGKILL and SIGSTOP can not be caught/ignored (according to POSIX and as implemented on platforms including Linux and FreeBSD). Trying to trap this signal has undefined results.
|
||||||
|
|
||||||
|
### Exceptions:
|
||||||
|
|
||||||
|
None. If you come across one, please file an issue about it.
|
Reference in New Issue
Block a user