Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Commit

Permalink
Eliminate concurency between parent and child which could override jo…
Browse files Browse the repository at this point in the history
…b status.
  • Loading branch information
Krzysztof A. Adamski committed Jun 7, 2008
1 parent dee3160 commit 721fa16
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions func/jobthing.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,12 @@ def minion_async_run(retriever, method, args):


job_id = "%s-minion" % time.time()
__update_status(job_id, JOB_ID_RUNNING, -1)
pid = os.fork()
if pid != 0:
__update_status(job_id, JOB_ID_RUNNING, -1)
os.waitpid(pid, 0)
return job_id
else:
__update_status(job_id, JOB_ID_RUNNING, -1)

# daemonize!
os.umask(077)
os.chdir('/')
Expand Down

0 comments on commit 721fa16

Please sign in to comment.