diff --git a/src/c/unixsys.d b/src/c/unixsys.d index af0214616..b6e52faa2 100644 --- a/src/c/unixsys.d +++ b/src/c/unixsys.d @@ -431,7 +431,7 @@ si_spawn_subprocess(cl_object command, cl_object argv, cl_object environ, &child_stderr, 0, TRUE, DUPLICATE_SAME_ACCESS); /* Same for the parent_read and parent_error. */ - parent_error = _open_osfhandle((intptr_t)child_stderr, _O_RDONLY); + parent_error = dup(parent_read); } else create_descriptor(error, @':output', &child_stderr, &parent_error);