From 000b6b0b00dc4561d983b7eccf3bb7854dbedf0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Tue, 21 Feb 2017 07:46:43 +0100 Subject: [PATCH] subprocess: windows: handle NIL as a stream argument --- src/c/unixsys.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/c/unixsys.d b/src/c/unixsys.d index 9bf76838b..9703b2a05 100644 --- a/src/c/unixsys.d +++ b/src/c/unixsys.d @@ -319,7 +319,10 @@ create_descriptor(cl_object stream, cl_object direction, printf("open_osfhandle failed\n"); } else if (Null(stream)) { - *child = NULL; + if (direction == @':input') + *child = open("nul", O_RDONLY); + else + *child = open("nul", O_WRONLY); } else if (!Null(cl_streamp(stream))) { HANDLE stream_handle = ecl_stream_to_HANDLE