http://www.perlmonks.org?node_id=965528


in reply to Exiting batch-started Perl script on WinXP shutdown

Shouldn't the script be receiving a signal when windows shuts down?

Using %SIG to set an appropriate action (cleanup; exit 0) might be the simplest way to go about this.

  • Comment on Re: Exiting batch-started Perl script on WinXP shutdown

Replies are listed 'Best First'.
Re^2: Exiting batch-started Perl script on WinXP shutdown (TERM)
by tye (Sage) on Apr 17, 2012 at 18:18 UTC

    It looks like p5git://win32/win32.c. turns CTRL_SHUTDOWN_EVENT into a SIGTERM, so $SIG{TERM} should work for this case.

    - tye