Why SIGHUP?


Earlier this week I sent a SIGHUP signal to a process to get it to reread it’s configuration file. Of all the signals that could have been chosen to perform this action, why SIGHUP? Well – the answer to this question comes on page 267 of Advanced Programming in the UNIX Environment 1st edition:

“This signal [SIGHUP] is commonly used to notify daemon processes (Chapter 13) to reread their configuration files. The reason SIGHUP is chosen for this is because a daemon should not have a controlling terminal and would normally never receive this signal.”*

Richard Stevens is my favorite technical writer of all time. He uses tons of well though out examples, and tackles subjects in a logical order (this is my biggest beef with some books). I miss him.

This article was posted by Matty on 2006-02-08 18:29:00 -0400 -0400