Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Implementing signals for Win32 Perl using named pipesby cdarke (Prior) |
on Mar 11, 2008 at 12:20 UTC ( [id://673462]=note: print w/replies, xml ) | Need Help?? |
BREAK, CTRL-C, QUIT can be handled using a Control Handler. You can setup a handler function using the Win32 API SetConsoleCtrlHandler() and raise one of these "signals" using GenerateConsoleCtrlEvent(). When a new process is created on Windows it can inherit the console of the parent, but this can be hidden (SW_HIDE). That way it is possible to emulate sending a signal to a "process group". Using a named pipe has its advantages, but would also need to be linked to exception handling as well, C0000005 generate a SIGSEGV? Emulating a SIGCHLD would be difficult, since there is no way to identify your parent, unless its PID is passed explicitly. I agree with the comments on injection, but if anyone wants to pursue that one I have some code which uses that technique in Win32::EnvProcess.
In Section
Seekers of Perl Wisdom
|
|