Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Godshell
Skynet
Commits
e0c41973
Commit
e0c41973
authored
Jan 08, 2015
by
Jason Frisvold
Browse files
- Check for child status to clean up processes
parent
31e33b04
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/spawner.py
View file @
e0c41973
...
...
@@ -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'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment