in reply to Keeping a program running
The parent could check the age of the file, or check the size (with the "-s" operator -- see the -X section of the perlfunc man page), sleeping for maybe 3 or 5 seconds between checks. If the file hasn't grown since the last check, kill the child pid and start a new child. Continue doing that as long as you want.
(Update: added link to docs for the "kill" function, to clarify that this is a built-in.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Keeping a program running
by Anonymous Monk on May 09, 2007 at 06:07 UTC | |
by graff (Chancellor) on May 09, 2007 at 18:44 UTC |