in reply to Re^2: Window Close / Process Termination Handler on Windows
in thread Window Close / Process Termination Handler on Windows
and another that is called back. The handler routine can then issue a signal of its own for your perl program to trap. It's a bit of a maze but these are the set of functions you can choose from to manage the windows console: https://docs.microsoft.com/en-us/windows/console/console-functionsBOOL WINAPI SetConsoleCtrlHandler( _In_opt_ PHANDLER_ROUTINE HandlerRoutine, _In_ BOOL Add );
Update: If you can live with uninterruptable, you could also consider a DOS wrapper that does "START /B wrapper2.bat", where wrapper2.bat runs the perl program. This should then be detached from the console window.
|Replies are listed 'Best First'.|
Re^4: Window Close / Process Termination Handler on Windows
by rminner (Chaplain) on Aug 29, 2018 at 16:01 UTC