in reply to Monitoring child threads

if you're really talking about threads and not processes, the SIGCHLD advice would be rather senseless. in this case you should consider implementing a handler for $SIG{__DIE__} in your main thread and localizing a hook for it in the child threads. e.g.:
# main thread: sub sig_die_handler { my $message = shift; warn $message; } [...] # child threads: local $SIG{__DIE__} = sub { &::sig_die_handler(shift) };
or something like that. anyway, this is roughly the way to achieve what you have in mind - if we're really talking about threads.
--------------------------------
masses are the opiate for religion.

Replies are listed 'Best First'.
Re^2: Monitoring child threads
by roboticus (Chancellor) on Jan 24, 2008 at 13:23 UTC
    TOD:

    D'Oh! I guess I should've engaged brain before typing.... ;^O

    Thanks for the catch. I saw threads and thought processes....

    ...roboticus

Re^2: Monitoring child threads
by weismat (Friar) on Jan 24, 2008 at 13:38 UTC
    We are talking about detached threads which communicate via queues(Thread::Queue) to each other.