in reply to Re: Re: Re: Catching signals
in thread Catching signals

its ActivePerl 5.6.1 build 633 (multi-thread) running under Windows NT (perl is actually called from within the cygwin environment, however, execution of program from outside of cygwin still has the same effect)

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Catching signals
by RMGir (Prior) on Sep 04, 2002 at 18:27 UTC
    Right; ActivePerl doesn't _really_ fork when you use fork, so that example's not going to work for you. I'm pretty sure the pseudo-forked processes they use wouldn't handle signals, even if they were supported under NT, which they aren't :)

    This is from the ActivePerl docs, under "Windows Quirks".

    Why doesn't signal handling work on Windows? Signals are unsupported by the Win32 API. The C Runtime provides crude support for signals, but there are serious caveats, such as inability to die() or exit() from a signal handler. Perl itself does not guarantee that signal handlers will not interrupt critical operations such as memory allocation, which means signal invocation may throw perl internals into disarray. For these reasons, signals are unsupported at this time.
    Try this script on a Linux box, or, if you're VERY brave, with a native cygwin perl. But be warned, with 5.6.1 under Cygwin, playing with that kind of script causes bad things to happen for me.
    --
    Mike
      That is good to know - frustrating, but nevertheless ... Maybe you can direct me to a better solution then. Please see 195159 node for the explanation of my question.