I was programming in C doing system calls, and I was wondering the following:
What’s an example of where you’d want a process to ignore alarm signals, say if the signal was sent because of a lost packet in intra-network processes?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Many important daemons are very picky about the signals they will respond to; they often install a handler for
SIGHUPto re-read their configuration file, use one ofSIGUSR1orSIGUSR2to indicate the need to close and re-open their log files for log-rotation, and handleSIGINT,SIGQUIT,SIGTERM, etc., in some sort of graceful way.Everything else should be ignored so that accidental signals do not cause the program to do funny things. The signals that are part of the program’s interface should work exactly as designed — and the other signals should do as little harm as possible.