Commit e0c41973 authored by Jason Frisvold's avatar Jason Frisvold
Browse files

- Check for child status to clean up processes

parent 31e33b04
......@@ -103,6 +103,12 @@ def main(argv):
if (len(spawnlist) > 0):
spawn_process(spawnlist)
# Check for child exit status so we don't have zombies
try:
os.waitpid(-1, os.WNOHANG)
except:
pass
logger.info('Sleeping until next loop iteration')
# Sleep until the beginning of the next minute
......@@ -284,7 +290,8 @@ def spawn_process(spawnlist):
try:
pid = os.fork()
if pid > 0:
sys.exit(0)
#sys.exit(0)
os._exit(0)
except OSError, e:
sys.stderr.write('fork #2 failed: ({0}) {1}'.format(e.errno,
e.strerror))
......@@ -362,7 +369,8 @@ def spawn_process(spawnlist):
os.remove(tmpfile)
sys.exit(0)
#sys.exit(0)
os._exit(0)
def open_timing_database():
logger.info('Opening timing database')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment