Skip to content
Snippets Groups Projects
Commit f0130513 authored by Antoine Millet's avatar Antoine Millet
Browse files

Now force exit if an exception is raised in execute's child

parent fc4b3702
No related branches found
No related tags found
No related merge requests found
......@@ -89,7 +89,14 @@ def execute(main_loop, args, stdin=None):
close_fds(debug=True)
os.execvp(args[0], args)
try:
os.execvp(args[0], args)
except OSError as err:
if err.errno == 2:
os._exit(127)
os._exit(1)
except:
os._exit(1)
else: # Parent
os.close(r_stdin)
os.close(w_stdout)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment