in reply to Detect Process End

I'm going to assume (bad idea, I know) that you're wanting to run this on linux. As such, linux stores process information in /proc/<pid>/. You could simply stat() the directory. If it exists, the process is running. If it fails, the process has ended.

Replies are listed 'Best First'.
Re^2: Detect Process End
by DrWhy (Chaplain) on Nov 27, 2004 at 23:15 UTC
    FYI -- other os's have the same or similar services. I know Solaris also has a /proc file system that can be used in the same way.

    --DrWhy

    "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."