in reply to I know that signal handling isn't working well on win32, but how bad is it?

ERROR_BROKEN_PIPE is returned (test $^E) by the Win32 API when writing to a pipe where the reader died.

Man, win32 sucks...:(

No, it is just different. A wise man once said to me: "All operating system stink, they just have different smells".

Signals are part of UNIX architechture. If you build an application which relies on a specific feature of an operating system then you cannot expect it to be portable. There are plenty of examples of Windows specific features that won't run on UNIX, but if you want portablity you have to avoid using them.

Win32 has a powerful event system which you might like to investigate. See Win32::Event. And no, it is not portable.
  • Comment on Re: I know that signal handling isn't working well on win32, but how bad is it?

Replies are listed 'Best First'.
Re^2: I know that signal handling isn't working well on win32, but how bad is it?
by Anonymous Monk on Feb 28, 2011 at 21:42 UTC
    A wise man once said to me: "All operating system stink, they just have different smells".

    Windows smells a lot worse than UNIX. A lot worse.
      Not at all. The API is quite good. My only complaint is how it passes parameters to new processes. It's miserable, and it causes problems at every level.

      Signals were a very, very bad design choice from the outset. *nix would be better off if they could be discarded.

      They have no good place in modern, multi-tasking, multi-threaded, multi-cored operating systems.


      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.
        Signals were a very, very bad design choice from the outset. *nix would be better off if they could be discarded. They have no good place in modern, multi-tasking, multi-threaded, multi-cored operating systems.
        I do think, though, that signals have some merits over the event kinds of IPC. One of the strongest merit would be the fact that it doesn't require an event dispatch loop running to catch the signal. They are delivered directly to the handler whenever it occure and this could save some timing and codes if used well.