in reply to How do I cleanly kill a spawned process on Win32.
Use perl's kill with
and perl will call GenerateConsoleCtrlEvent() with CTRL_C_EVENT.
and perl will call GenerateConsoleCtrlEvent() with CTRL_BREAK_EVENT.
If the receiving process is another Perl script, it can trap these events using the appropriate %SIG handlers.
If is is a non-perl program it will need to use SetConsoleCtrlHandler() to install handlers to respond to the generated events and exit cleanly.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I cleanly kill a spawned process on Win32.
by DrWhy (Chaplain) on Feb 26, 2009 at 10:14 UTC | |
by BrowserUk (Patriarch) on Feb 26, 2009 at 10:50 UTC | |
by Anonymous Monk on Apr 20, 2009 at 02:22 UTC | |
|
Re^2: How do I cleanly kill a spawned process on Win32.
by cdarke (Prior) on Feb 26, 2009 at 09:25 UTC | |
by BrowserUk (Patriarch) on Feb 26, 2009 at 09:42 UTC | |
by locked_user sundialsvc4 (Abbot) on Feb 27, 2009 at 01:07 UTC | |
by BrowserUk (Patriarch) on Feb 27, 2009 at 01:59 UTC |