Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: The implementation of SIGHUP in Win32 Perl

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


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

You wrote, "I think you need to do a lot more reading and experimenting," and while that is certainly true (and will still be true the day I die) I hope you and others will consider what I write based upon its merit and utility rather than dismiss it due to my lack of standing within the Perl community.

You also wrote, "I'm not really sure I understand your motivation for meditating on this." Here in Chicago where I live, the authorities run anti-terrorism public service announcements which say "If you see something, say something," about the need for everyone to contribute to the public safety by reporting their suspicions. I noticed what I believe to be serious problems with the SIGHUP implementation in Win32 Perl. I have some suggestions for how to resolve those problems but I lack the talent, experience, and reputation to resolve those issues myself. I've not seen another discussion covering this issue in the same way. I love Perl even though I don't make a dime from it. I'd feel irresponsible if I did not say anything about this. I have to "say something."

Although I am a new member of PerlMonks, I've lurked here since Dave Roth was a Perl/Win32 "rock star." I know of your reputation as a current "rock star," and am thrilled by your attention. I believe if I can convince you of what I see as a problem, you have the "pull" to help get it resolved. So now you know my motivation.


Comment on Re^2: The implementation of SIGHUP in Win32 Perl
Re^3: The implementation of SIGHUP in Win32 Perl
by BrowserUk (Pope) on Sep 02, 2013 at 02:33 UTC
    I hope you and others will consider what I write based upon its merit and utility rather than dismiss it due to my lack of standing within the Perl community.

    Hm. I spent 1 day waiting for you to reply to my first questions; and 2 days on and off experimenting with code and reading documentation before replying with my best explanation of my findings.

    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).

    But the attitude....

    I noticed what I believe to be serious problems with the SIGHUP implementation in Win32 Perl.

    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.

    Injecting a 9.5 second sleep into a signal handling routine is about as absurd an approach to 'fixing' it as I could imagine.

    But hey. What do I know. Good luck with that.


    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.

      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.

        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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2014-09-22 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls