in reply to Re: When to use sigtrap, when to assign to %SIG?
in thread When to use sigtrap, when to assign to %SIG?

There is a common misperception that signals don't work on Windows Perl. Not true. sleep() is implemented in terms of ALRM and that can and does cause difficulties, but the basic signals do work on Windows XP.

Funny. Windows doesn't even have an API for signals, so how could they "work"?

Perl emulates signals on Windows, and that emulation is not perfect. It "works" for some common cases, but even then, the emulation behaves different from a Unix system. See also perlport, perlwin32.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^2: When to use sigtrap, when to assign to %SIG?

Replies are listed 'Best First'.
Re^3: When to use sigtrap, when to assign to %SIG?
by Marshall (Canon) on Jan 02, 2012 at 11:48 UTC
    Update: Something about this post "tweaked some go-buttons", I don't know why, but I think further posts make what I intended very clear. I can just strike this without changing the advice.

    Alexander, Perl provides the basic signal functions on Windows meaning emulate.

    The OP was asking about CTRL-C.
    And I provided some code that runs even on Windows! Although the question was not about Windows.

    If the question is about Windows specifically, lets start a new thread about it.

    My advice and code stands for *nix also.

      The OP was asking about CTRL-C
      No, he did not. The OP did not even mention CTRL-C. In fact, I'd say the question wasn't even about interrupt signals in particular. The OP asked a general, 3-parted question about signals, with only the last part actually mentioning a specific signal, where he was kind of forced (by the syntax) to use a signal name. You were the one mentioning CTRL-C, and started off about "well known" behaviours of text editors.