Skip to content
koalaman edited this page Nov 1, 2015 · 1 revision

Trapping signals by number is not well defined. Prefer signal names.

Problematic code:

trap myfunc 28

Correct code:

trap myfunc WINCH

Rationale:

Signal numbers can vary between platforms. Prefer signal names, which are fixed.

Signal numbers 1, 2, 3, 6, 9, 14 and 15 are specified as parts of the optional POSIX XSI and ShellCheck will not warn about these.

Exceptions:

None.

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature guerraart8 to find a specific , or see Checks.

Clone this wiki locally