[Issue 14422] std.process: Pipes do not append to files on Win64
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Apr 7 05:15:57 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14422
--- Comment #1 from Vladimir Panteleev <thecybershadow at gmail.com> ---
C program which reproduces this bug:
/////////////////////// ctest.c ///////////////////////
#include <stdio.h>
#include <windows.h>
void main()
{
FILE *f;
PROCESS_INFORMATION pi = {0};
STARTUPINFO si = {sizeof(STARTUPINFO)};
f = fopen("test.txt", "w");
fprintf(f, "AAAAAAAAAA\n");
fclose(f);
f = fopen("test.txt", "a");
si.hStdOutput = (HANDLE)_get_osfhandle(_fileno(f));
si.dwFlags = STARTF_USESTDHANDLES;
CreateProcess(NULL, "cmd /c \"echo BBBBB\"",
NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi);
}
///////////////////////////////////////////////////////
--
More information about the Digitalmars-d-bugs
mailing list