Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Implementing signals for Win32 Perl using named pipes

by cdarke (Prior)
on Mar 11, 2008 at 12:20 UTC ( [id://673462]=note: print w/replies, xml ) Need Help??


in reply to Re: Implementing signals for Win32 Perl using named pipes
in thread Implementing signals for Win32 Perl using named pipes

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.
  • Comment on Re^2: Implementing signals for Win32 Perl using named pipes

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://673462]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-20 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found