jenkinsci/coverity-plugin — pull request #2 by weak (2012-10-25 20:12:04+00:00)
Title: [JENKINS-15630] Build using Coverity Plugin fails because /tmp/.covlk file exists (Multiple jobs on executor)

This is an attempted fix for [\[JENKINS-15630\]](https://issues.jenkins-ci.org/browse/JENKINS-15630). I added a check for $TMPDIR/.covlk before invoking cov-build. If the file exists, it will check every second. When the file is deleted, this indicates that it is ok to proceed invoking cov-build.

Coverity Lock File /tmp/.covlk exists. cov-build must already be running. Waiting for it to free up.
Coverity Lock File still exists after 1 minute(s).
Coverity Lock File still exists after 2 minute(s).
Coverity Lock File still exists after 3 minute(s).
Coverity Lock File disappeared. Proceeding.

I'm not entirely sure if this is the best solution, but it resolves the issue for me.

If this is accepted, I think we should consider tweaking the routine such that it gives up after a period of time and proceeds with invoking cov-build.

Let me know if you have any questions or if there is something else I should be considering. Thanks!