rovf has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
One of my classes has a sub DESTROY. I found (by putting a print into the function's body), that this function is not called when I terminate a program with control-C (more precisely, when I have a batch file calling my command line Perl program, and the batch file is terminated by first pressing control-C and then answer Y to the question "terminate batch file (Y/N)?").
It looks as if Windows doesn't give the program the chance to gracefully shut down. Could someone confirm this observation?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Windows: Destructor not executed on Control-C
by moritz (Cardinal) on Aug 20, 2008 at 14:45 UTC |