[RH199] A note about kill -1
https://role.rhu.redhat.com/rol-rhu/rhz/rhls/course/rh199-7/ch06
It is probably worth noting (in a warning bubble or something) in a part which describes usage of numerical signal values as arguments to kill that "kill -1" has a very special behaviour which could be especially disastrous in scripts, when authors write something like "kill -1 $PID", e.g. without quoting the last argument; I would suggest using "kill -s 1" instead or advising on avoiding numerical values altogether as non-portable (even considering that SIGHUP has the same value on each Linux-supported architecture).
Responses
Hi Eugene,
The URL you link is one that's available to Red Hat Employees only, so it's probably not prudent to write posts about it in a public, customer facing forum.
That said, using -# syntax for kill is standard across most Unix variants and cousins. Many of the signals themselves, like SIGHUP, SIGQUIT, SIGTERM, SIGKILL, etc. are also assigned the same signal ID number across those variants as well. Conversely, the -s option is not as widely accepted, and was not always available even within older versions of RHEL.
One should always be careful when using kill, and if you're using it in an automated fashion, like in a script or playbook, you probably want to take extra special care in testing those mechanisms before deploying it widely to your infrastructure/population.
-STM
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
