in reply to Re: (slightly OT) catching SIGTERM when system goes down
in thread (slightly OT) catching SIGTERM when system goes down
echo will not be seen during shutdown (where would it echo to?). Like I said, I tried it by sending the signal myself using kill, and that works. It's only during reboot that it doesn't work.
I'm actually looking into the possibility that I realized only after I posted: I am running the program in a console and then typing reboot from another console. So won't my program get killed when the console is killed, before being killed by shutdown? If so, what signal does it get? - Gotta look into that, but now I just got pulled away on something else.
Re: 'clean-later' marks: I thought it is best to do as little as possible inside a signal-handler because of problems with re-entrant system calls - that's why I set the global and do the clean-up work later. Am I wrong in this?
--
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: (slightly OT) catching SIGTERM when system goes down
by Tomte (Priest) on Apr 09, 2003 at 14:26 UTC | |
by edan (Curate) on Apr 09, 2003 at 14:37 UTC | |
by Tomte (Priest) on Apr 09, 2003 at 15:16 UTC | |
|
Re: Re: Re: (slightly OT) catching SIGTERM when system goes down
by isotope (Deacon) on Apr 09, 2003 at 17:45 UTC |