No such thing as a small change | |
PerlMonks |
Re^4: The implementation of SIGHUP in Win32 Perlby klaten (Novice) |
on Sep 02, 2013 at 04:02 UTC ( [id://1051881]=note: print w/replies, xml ) | Need Help?? |
I apologize if my responses are too slow for you. As I said earlier, I am not a professional IT person (although I was in the past), in fact, I am a working class stiff, a security guard. I write when I can. While you were posting your response to me, I was busy trying to pull together all my thoughts and ideas into one coherent post which I have since submitted. It took me a couple of hours to put that together. That's the best I've got. I have a sixteen-hour double-shift as a security guard tomorrow (ironically, the American "Labor Day" holiday) so you won't hear from me for a while. I mean you no disrespect, in fact, as I wrote earlier I respect your opinion and ideas greatly, Now, regarding what you wrote in this post you're right of course, there's no implementation of any signals in Windows itself (including SIGINT or SIGBREAK for that matter), I understand that what Perl is processing as a "signal" in Win32 is a construct of the Microsoft C runtime library. But, what *is* generated by Windows and supposedly translated (the translation is what I believe is failing) by Perl calls into the C runtime library is an EVENT (in this case a CTRL_CLOSE_EVENT). I understand that this event is generated by a Windows Console Object in response to either a user clicking the close button on a console window or the console window receiving a WM_CLOSE message. MSDN describes it like this: "A signal that the system sends to all processes attached to a console when the user closes the console (either by clicking Close on the console window's window menu, or by clicking the End Task button command from Task Manager)." Regarding its utility, unless that implementation works, I can see no way that pure Perl would be able to ever trap something as simple as a user accidentally closing a console window running a Perl program with an open data file, or being able to gracefully shutdown if for example an Uninterruptible Power Supply (UPS) sent a power lost, please shutdown the OS message which prompted a system shutdown. Other languages can gracefully deal with these types of situations, and so should Perl. I did (independently) reach the same conclusion you did about the 9.5 second thing, a bad idea, but for reasons differently than I imagine you believe.
In Section
Meditations
|
|