Problem: You want your script to execute without overlapping another execution. Solution: Make a flag file so you know that your script is already executing. Extended problem: What if your script dies and leaves the flag file behind? Extended solution: Check the process list to see if the old instance is still alive. Ext. Ext. [...]
Entries Tagged as 'bash shell script pid'
bash shell script to manage pid file creation/deletion
October 30th, 2009 · No Comments · Linux, OS X
Tags: bash shell script pid