On Tue, 13 Aug 2002, Sudarshan Raghavan wrote: > > Case 2) Parent dies and child still alive > From the parent you can send a signal to the child > and handle it in the child. Something like > Parent process > kill ('USR1', $child_pid); > Child process > $SIG{USR1} = sub { die "Parent process is dead" };
Sorry!! This solution applies when the parent knows that it must die and wants to kill the child. In which case a much easier way would be kill ('TERM', $child_pid); or kill ('INT', $child_pid); or kill ('KILL', $child_pid); If you are going to send SIGTERM or SIGINT to the child you can handle them and exit in the child gracefully. You cannot do that with SIGKILL. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]