Skip to content

Commit

Permalink
Properly pass stdio handles to child process (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
cqjjjzr committed Apr 1, 2022
1 parent 54e6d9c commit 99f7f73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ std::tuple<std::unique_handle, std::unique_handle> MakeProcess(const std::wstrin
std::unique_handle threadHandle;
std::unique_handle processHandle;

GetStartupInfoW(&si);

if (CreateProcessW(nullptr, cmd.data(), nullptr, nullptr, TRUE, CREATE_SUSPENDED, nullptr, nullptr, &si, &pi))
{
threadHandle.reset(pi.hThread);
Expand Down

0 comments on commit 99f7f73

Please sign in to comment.