DWORD written;
if (!WriteFile(fd_in[1], buffer, max_len, &written, nullptr)) {
throw runtime_error("failed to write to child process' input stream");
DWORD written;
if (!WriteFile(fd_in[1], buffer, max_len, &written, nullptr)) {
throw runtime_error("failed to write to child process' input stream");