Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
If dying process takes lock directory with it, re-create the lockdir.
  • Loading branch information
PeterScott committed Nov 1, 2011
1 parent bdb1003 commit 5ecfeaf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/upload.py
Expand Up @@ -167,6 +167,10 @@ def main():
time.sleep(5)
os.kill(pid, signal.SIGKILL)
time.sleep(1)
try:
os.mkdir(lock)
except OSError:
pass
writePid(lock)
except (IOError, ValueError, OSError):
# No pid file, bad pid file, or pid doesn't exit. Fix this manually.
Expand Down

0 comments on commit 5ecfeaf

Please sign in to comment.