[LIP] Sending TERM, and signal handler issue.
Amarendra Godbole <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Organization | GE Security - IBC |
| Message-ID | <[email protected]> |
Hi, I have a process `foo,' which runs along with its 10 children. Now, foo.c has an handler for SIGTERM, which first reaps its children, and then goes off. foo is started and stopped from a startup script, in runlevel 3. This script has the typical `kill -TERM <foo_pid>,' to kill foo. foo handles this TERM and does a proper cleanup. This script when executed on command line executes fine... ...but when my system is shutting down - I run into real trouble. It seems that the `kill' never actually kills foo, and the shutdown script goes in a loop trying to kill it (I have the loop put there.) Also, while executing it from the command line, I see that the kill is being done three to four times, before foo actually goes down. I suspect some issue with the way foo handles SIGTERM. Can someone confirm this ? foo is a part of legacy code. Thanks in advance. Cheers, Amar -- Destiny is not a matter of chance, it is a matter of choice. ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl