What what it's worth, I'd like to endorse the solution offered by adamk earlier in the thread. I had been handling a similar problem through the use of lockfiles, but it wasn't working out too well. I decided to give adamk's suggestion a try and it absolutely works a treat. It's also nice and neat and very easy to implement.