Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Mellow Funks (sic)

Recently I have been writing perl wrappers around various windows executables, being launched by smedge2 . Being sensible and considerate, (covering my ass) I inserted signal handlers in the wrappers, which call a cleanup sub, whose goal is to kill the PID returned by a piped open. Hence the wrapper cleans up it's own mess. Great! except for the non-POSIX ness of windows. Smedge seems pretty wise to 'processes that refuse to die' and it's method of killing the wrapper does not send any signals that I can catch AFAIK. The by product of course is that the wrapper goes down and it's children go rogue - no caring that nothing is listening to the output pipe.

Win32::Process looks great for managing process, but not for determining whether THIS process is being killed by some OTHER process.


How can I trap this not-a-SIGnal so my wrappers can cleanup correctly?

I can't believe it's not psellchecked

In reply to Ways and means of killing Win32 processes by submersible_toaster

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-18 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found