Skip to content

Commit 23a526f

Browse files
committed
force exit without error in run_from_commandline in order to avoid global python exit errors
1 parent 4c7599c commit 23a526f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

capsul/process/process.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,12 @@ def run_from_commandline(process_definition):
783783
with open(out_param_file, 'w') as f:
784784
json.dump(json_utils.to_json(output_params), f)
785785

786+
# if there was no exception, we assume the process has succeeded.
787+
# sys.exit(0)
788+
# no error, do a dirty exit, but avoid cleanup crashes after the
789+
# process has succeeded...
790+
os._exit(0)
791+
786792
def get_log(self):
787793
""" Load the logging file.
788794

0 commit comments

Comments
 (0)