in reply to Re: How do I dump data to file on hard exit?
in thread How do I dump data to file on hard exit?

DOH!!!

Closed the file after dieing, ah well you know what i mean.
BTW, this will only get ctrl c it wont do a server reboot.

Displeaser
  • Comment on Re^2: How do I dump data to file on hard exit?

Replies are listed 'Best First'.
Re^3: How do I dump data to file on hard exit?
by johngg (Canon) on Mar 31, 2006 at 14:17 UTC
    The process might get a TERM signal on a reboot so set up a handler for that as well.

    $SIG{TERM} = ...

    Cheers,

    JohnGG

Re^3: How do I dump data to file on hard exit?
by salva (Canon) on Mar 31, 2006 at 14:22 UTC
    BTW, this will only get ctrl c it wont do a server reboot.

    Most (all?) Unix OSs will send a TERM signal to every process running when shutting down, and a KILL one if they do not terminate after a while.