in reply to Re^3: how can a perl script determine it's own PID while running
in thread how can a perl script determine it's own PID while running

Though if your script gets severely trashed a la kill -9 the file would still be there. Usually you are best off combining the pid file with a kill check... or a check for the proc dir.

                - Ant
                - Some of my best work - (1 2 3)

  • Comment on Re^4: how can a perl script determine it's own PID while running

Replies are listed 'Best First'.
Re^5: how can a perl script determine it's own PID while running
by ikegami (Patriarch) on Aug 14, 2006 at 21:27 UTC
    That's why you don't just check for the file. If the file exists, you read the process's pid from the file and then check for the process.