in reply to Parent process finished. How to exit the child process.
And in the first place, I'm not even sure if this is a good way to count the time in parallel with other tasks.I don't see either what purpose it has to "count a time". We don't measure a time by "counting" (and don't forget that a sleep(1) only means that the process sleeps for at least 1 second, not that it sleeps for exactly one second), and I also don't see what advantage it has to do this time measurement in a separate process instead in the parent process, but if you insist doing so: In addition to the other suggestions you already got, there are many other ways to set up a communication between parent and child, for example named pipe, shared files or shared memory.
But maybe you should tell us why you want to measure process times. Do you want to time out a possibly hanging process? This may be done better in a completely different way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parent process finished. How to exit the child process.
by ybnormal (Novice) on May 07, 2010 at 11:20 UTC | |
by rovf (Priest) on May 10, 2010 at 09:32 UTC |