Hello,

When I receive a signal (for example,TERM or INT) from terminal,I want to
get the process exit immediately.But the process have some childs running,so
he would tell the childs to exit before he exit.So I write a kill statement
(used to kill childs) in parent's signal handler.For example:

# defined in parent
$SIG{TERM}=sub { kill TERM => keys %childs;exit 0};

where %childs record all childs' PIDs.

Does this signal handler correct?I don't see anyone defined another 'kill'
statement in some a singal handler,so I'm comfused about it.
Thanks.

Reply via email to