문제

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.

도움이 되었습니까?

해결책

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...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top