in reply to Re^3: How do we capture CTRL^C
in thread How do we capture CTRL^C

Hmm, not wanting to get into a semantic squabble here, but unless I'm mistaken (which is always possible) it is the signal handler, not the signal itself which was unsafe. Or more precisely the way perl used to process signals wich allowed for "unsafe" handling.

I was referring to Zaxo's signal handler, which printed out a string. As the linked node mentions, it is possible to cause a core dump when doing stdio in a signal handler during another stdio operation. So I figured a word of warning would be appropriate, since the original poster seemed to want to intercept the SIGINT and carry on regardless. Sorry for not explaining that in more detail earlier.

Replies are listed 'Best First'.
Re^5: How do we capture CTRL^C
by Limbic~Region (Chancellor) on Mar 08, 2005 at 00:00 UTC
    tirwhan,
    Or more precisely the way perl used to process signals

    This is the core of the issue which is a potential problem regardless if you have signal handlers or not. It wasn't obvious that you were referring to something specific about Zaxo's post to be concerned with. In light of that, I would agree that caution is warranted. In other words, adding a signal handler may exacerbate a potential problem.

    Cheers - L~R