Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Handling killing the perl process

by afoken (Abbot)
on Jan 04, 2010 at 10:01 UTC ( #815548=note: print w/replies, xml ) Need Help??

in reply to Handling killing the perl process

Microsoft Windows has no concept of signals, we've discussed that in $SIG{ALRM} and windows vista? and some other threads. Perl implements an emulation, but it is not perfect, and it probably won't help you here.

Windows sends lots of messages to a window when it thinks the process owning the window should terminate, like WM_CLOSE and WM_QUIT. So you need to catch those messages. With a console window, things are a little bit more complicated, as Windows fakes some keypresses (from memory - RTFM), too, and you can't catch the messages sent to the console window (from memory - RTFM). And ultimately, Windows can forcefully terminate a process by directly invoking ExitProcess() or the like from the processes' context, without any way for the process to stop or delay that (similar to kill -9, but implemented as "forced suicide").


Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://815548]
[LanX]: I mean hiding my friends FROM my friends
[Your Mother]: Yeah. I don't know what they expect. If a stranger can see the post or list or whatever, so can a harvesting program.
[Your Mother]: HA.
[NodeReaper]: he's already hiding from me :(
[Corion]: Your Mother: Even I don't remember what "related and neat" I could have that would fit to 1211240 :) Maybe "pjax", which turns a static site into a Javascript-partial -reloading site? That's purely Javascript though
[LanX]: true I might get visa problems when they hear about my love for massacres ...
[Your Mother]: Corion, it was something similar to Cometd/Websockets.
LanX is reminded that public sarcasm is causing rpoblems nowadays ... ehm ...
[Your Mother]: Americans love massacres as long as it's brown and red people. Ooops. That was supposed to be a state secret. There goes my Q clearance.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2018-03-19 13:35 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.