Roel Dillen wrote: > I have a shell script I want to run which generates an html page after it > runs some tests on the software I am writing. > > I call the script with exec(…); > > The tests take more than 2 minutes to complete. > > If I try to run more than one test at the same time: trouble. > > > > I want to solve this by checking somehow whether the tests are running. > > If so, then the php code just waits until the running test are complete, > referring the second user to the same results page as the first. > > > > Ideas anyone? > a file used as a lock file? (have the shell script remove the file when it's done) - possibly in combo with flock()? if the lock file exists (or cannot be created because it already exists - depending on how you fancy implmenting it) then don't try to run the script. have the shell script check the process list for itself and return straight away with an error (or some useful message) if it finds its self? - my gut says this is the more robust/nicer method. er .... um ... nope no more ideas here :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php