Skip to content

Files

Latest commit

 

History

History
21 lines (12 loc) · 489 Bytes

SC2173.md

File metadata and controls

21 lines (12 loc) · 489 Bytes

Pattern: Use of trap with SIGKILL/SIGSTOP

Issue: -

Description

SIGKILL and SIGSTOP cannot be caught/ignored according to POSIX and as implemented on platforms including Linux and FreeBSD. Trying to trap this signal has undefined results.

Example of incorrect code:

trap 'echo "unkillable"' KILL

Example of correct code:

Not applicable. This is not possible.

Further Reading