Frage

I was going through following stackoverflow post

In what order should I send signals to gracefully shutdown processes?

and came across following statement. Please help me understand the part I have marked in bold. [found in the answer with 3 votes]

"The reason that daemons sometimes use SIGHUP to restart or reload config is that daemons detach from any controlling terminals and therefore would never receive SIGTERM, so that signal was considered as "freed up" for general use.

War es hilfreich?

Lösung

I think they must have meant this:

The reason that daemons sometimes use SIGHUP to restart or reload config is that daemons detach from any controlling terminals and therefore would never receive SIGHUP, so that signal was considered as "freed up" for general use.

That is, SIGHUP is a signal that would normally be sent only to a process that has a controlling terminal. Since daemons don't have a controlling terminal, they wouldn't get a SIGHUP for the normal reason. So they redefine it for another purpose.

But I could be misinterpreting the original author of that sentence. I think you did the right thing by asking for clarification in a comment on the original answer. Posting here as a separate question doesn't seem ideal...

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top