in reply to Re^2: Child process dies
in thread Child process dies
Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Child process dies
by johngg (Canon) on Jan 05, 2007 at 20:11 UTC | |
I was already trying things like explicitly closing the pipe in the parent if it caught a signal. Following your post I have modified the script so the child keeps printing a "heartbeat" to the pipe but still to no avail. Here's the modified script.
I had been killing the parent with a kill -15 (TERM) from another shell but I noticed that the child does go away immediately if I Ctrl-C the running parent. Is it the case that child processes also get an INT if the parent gets one from the shell? Cheers, JohnGG | [reply] [d/l] [select] |
by polettix (Vicar) on Jan 05, 2007 at 23:58 UTC | |
Linux box with a slightly modified version of your script, and the parent signalled from another shell:
Note that after the parent exits the shell regains control, hence the prompt. Within a second, the kid is trying to write to the pipe and gets signalled. Also note the following run (stopped with CTRL-C):
Both processes get the INT signal: probably the shell sends the signal to the whole process group. Flavio | [reply] [d/l] [select] |