Is there a way to find out what will program do when it receives kill signal HUP?
Without simply running the command ofc :D
killall -HUP pppd will restart pppd
killall -HUP firefox will just kill firefox
Read its documentation. That's the only way. As Keith already wrote, the original meaning of SIGHUP was that the user had lost access to the program, and so interactive programs should die. Daemons — programs that don't interact directly with the user — have no need for this behavior and instead often reload their configuration files when they receive SIGHUP. But these are just conventions.
If you have the source, you can read that, too. Or if you only have the binary, you can try disassembling it, look for
At any point in time, a given process is in one of three states with respect to a particular signal: ignoring it, performing the default action or running a custom handler. Many unices allow you to see the signal mask of a process with
The default action is to terminate the process on SIGHUP. See