From 6a058a4bfc77a1fa5841d7019fb7099f39ed97fa Mon Sep 17 00:00:00 2001 From: Eric Timmons Date: Thu, 12 Nov 2020 16:43:30 -0500 Subject: [PATCH] si_spawn_subprocess: _exit instead of abort if exec fails On MacOS, the stream flushing that happens as part of abort can corrupt streams in the parent process. See: #600 --- src/c/unixsys.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c/unixsys.d b/src/c/unixsys.d index 8901548a..e4d6162b 100644 --- a/src/c/unixsys.d +++ b/src/c/unixsys.d @@ -529,7 +529,7 @@ si_spawn_subprocess(cl_object command, cl_object argv, cl_object environ, } /* at this point exec has failed */ perror("exec"); - abort(); + _exit(EXIT_FAILURE); } close(child_stdin); close(child_stdout);