in reply to Suggestions on differentiating child processes
then just make sure each process sets $TASK correctly and do$SIG{__USR1__} = sub { open(my $f, ">/tmp/taskinfo"); print $f "$$'s current task is $TASK\n"; close($f); }
> kill -USR1 12345 > cat /tmp/taskinfo 12345's current task is making breakfast
Could be dangerous on perls where signals are not safe (pre 5.8 I think)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Suggestions on differentiating child processes
by steves (Curate) on Nov 12, 2004 at 18:15 UTC | |
|
Re^2: Suggestions on differentiating child processes
by gnu@perl (Pilgrim) on Nov 12, 2004 at 18:01 UTC |