in reply to Re: a question on threads
in thread a question on threads

Do signals work with threads?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

Replies are listed 'Best First'.
Re^3: a question on threads
by djp (Hermit) on May 12, 2005 at 04:10 UTC
    Possibly not, hence 'might'.
      at least $SIG{__DIE__} works in threads. if you install a hook for it, for instance a logger, like:
      $sig{__DIE__} = sub { add_log(shift) };
      (with add_log being the sub that prints out messages to a logfile), this hook will be recognized even from within a thread. you then get the original error message plus a "thread was unable to start".

      language is a virus from outer space.
Re^3: a question on threads
by typobox43 (Initiate) on May 12, 2005 at 15:28 UTC
    Not unless you feel like having your signal sent to every thread of your process.

      Exactly.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.