in reply to Re: Temporary files and cleaning up after an interruption
in thread Temporary files and cleaning up after an interruption
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; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
(tye)Re2: Temporary files and cleaning up after an interruption
by tye (Sage) on Jan 05, 2001 at 10:23 UTC |