How does a child wait for a parent to exit? (use flock as an IPC mechanism)
Another related technique:
# in the child: while (whatever...) { do_some_work(); if (getppid() == 1) { print "my parent is dead!"; clean_up(); exit; } }
In reply to Re: Temporary files and cleaning up after an interruption
by Dominus
in thread Temporary files and cleaning up after an interruption
by mischief
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |