$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