mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
fix SpawnedProcess ERROR_BAD_LENGTH
Summary: This fixes the `The program issued a command but the command length is incorrect` error we have been seeing in EdenFS Windows. Reviewed By: wez Differential Revision: D23589264 fbshipit-source-id: 72478a653ff07fca81c163bab12c0fd33f6a0a67
This commit is contained in:
parent
a6a73ec6b6
commit
01315a9bbc
@ -562,6 +562,19 @@ SpawnedProcess::SpawnedProcess(
|
||||
handles.push_back(handle);
|
||||
}
|
||||
|
||||
if (!startupInfo.StartupInfo.hStdInput) {
|
||||
startupInfo.StartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
handles.push_back(startupInfo.StartupInfo.hStdInput);
|
||||
}
|
||||
if (!startupInfo.StartupInfo.hStdOutput) {
|
||||
startupInfo.StartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
handles.push_back(startupInfo.StartupInfo.hStdOutput);
|
||||
}
|
||||
if (!startupInfo.StartupInfo.hStdError) {
|
||||
startupInfo.StartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
|
||||
handles.push_back(startupInfo.StartupInfo.hStdError);
|
||||
}
|
||||
|
||||
SIZE_T size;
|
||||
InitializeProcThreadAttributeList(nullptr, 1, 0, &size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user