Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
return NULL;
}
start_info.hStdInput = in_fd[0];
- result->in_fd = _open_osfhandle((intptr_t)in_fd[1], _O_APPEND);
+ result->in_fd = _open_osfhandle((intptr_t)in_fd[1], _O_WRONLY);
if ( !SetHandleInformation(in_fd[1], HANDLE_FLAG_INHERIT, 0) )
return NULL;
} else {
&start_info,
&proc_info);
+ if (pipeflag & 1) CloseHandle(in_fd[0]);
+ if (pipeflag & 2) CloseHandle(out_fd[1]);
+ if (pipeflag & 3) CloseHandle(err_fd[1]);
+
// Error?
if (!created) {
result->running = 0;
A hello world!
0
-B hello world!0
+B hello world!true
+0
C hello world!
0
var ip = new ProcessReader("echo", "B hello world!")
ip.read_line.output
+ip.eof.output
ip.wait
print ip.status