Commit f0130513 authored by Antoine Millet's avatar Antoine Millet

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

parent fc4b3702
......@@ -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)
......
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