Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^4: The implementation of SIGHUP in Win32 Perl

by klaten (Novice)
on Sep 02, 2013 at 04:02 UTC ( #1051881=note: print w/replies, xml ) Need Help??

in reply to Re^3: The implementation of SIGHUP in Win32 Perl
in thread The implementation of SIGHUP in Win32 Perl

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.

  • Comment on Re^4: The implementation of SIGHUP in Win32 Perl

Replies are listed 'Best First'.
Re^5: The implementation of SIGHUP in Win32 Perl
by BrowserUk (Pope) on Sep 02, 2013 at 04:51 UTC
    I apologize if my responses are too slow for you.

    I didn't say your response was too slow. Indeed, I demonstrated that, by waiting for it and then expending further effort assessing that response.

    But no more. Bye.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      The last thing you wrote in this thread was:

      I didn't say your response was too slow. Indeed, I demonstrated that, by waiting for it and then expending further effort assessing that response. But no more. Bye.

      Thanks to having to pad around an empty warehouse for sixteen hours yesterday, I have had much time to ponder our exchange here on PerlMonks. Your remarks felt like a "summary dismissal," and if that was your intent, then please forgive my inability to simply leave it at that.

      After years of "lurking," this was my first thread on PerlMonks. You, and your postings were one of my main motivations for becoming active here in the first place. The reason I knew the signal code was in win32.c was because you posted it, here, besides my own experiences, I know the SIGHUP implementation is problematic based on your postings, here. I'm a big boy, and I'll soldier on, but it stings a bit to be dismissed by someone whose writings (both technical and personal — that is powerful stuff you wrote in your profile) you learn from and admire.

      Some of your remarks during this exchange left me feeling as if I tripped over some unknown PerlMonks etiquette land mines and if so, I'd really like to know what they were so I can avoid them in the future. For example, in one post you wrote:

      If I ignore you in future; it won't be because of your lack of standing in the Perl community. (For all I know you could be Larry himself).

      Well, because I do value your opinion, I sincerely hope you won't ignore me in the future, but, you never said what I wrote to flirt with your "ignore him" button.

      Perhaps you felt I ignored your remarks: when you wrote,

      My finding are that there is no implementation of SIGHUP on windows. What is there doesn't appear to do anything useful; and it is hard to see what use it would be put to if it did do something useful.

      I didn't challenge that. Your experiences are extensive and I imagine your research to be significant. But, naive, inexperienced me wants the implementation to be "useful." Maybe it's wishful thinking upon my part, but the author of that code in win32.c put it there for a reason, and I'm willing to "tinker" around with it a bit more to make it so. At one point, inexplicably to me you wrote in what seemed to be a sarcastic tone: "But hey. What do I know." Well, as I've written earlier, I know you know a lot.

      At one point, you wrote, in response to an opinion I voiced, "But the attitude...." Maybe I'm tripping over an unknown difference between British and American English, but on the south-side of Chicago, having the wrong "attitude" can get you killed! So what attitude did I project?

      In closing, I must say, thank you. I got what I expected out of my meditation. I put an idea out to be subjected to criticism and I appreciate the time you (and moritz) put into your responses and questions. (my answer to moritz has led me to abandon my, as you called it, "absurd" idea about a time delay before returning with a perhaps even more preposterous "infinite loop"). I am wiser and more informed than I was when I first posted. If you feel your time was wasted, I am sorry, but I do feel you are much better suited to be a mentor than a cynic.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1051881]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2018-04-21 10:39 GMT
Find Nodes?
    Voting Booth?