Skip to content

Commit a6bba9e

Browse files
authored
Merge pull request #334 from dgriffen/fix-conpty-invocation
fix handle inheritance for shells
2 parents 32ea3e4 + 95c9a01 commit a6bba9e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/win/conpty.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,11 @@ static NAN_METHOD(PtyConnect) {
320320
// Attach the pseudoconsole to the client application we're creating
321321
STARTUPINFOEXW siEx{0};
322322
siEx.StartupInfo.cb = sizeof(STARTUPINFOEXW);
323+
siEx.StartupInfo.dwFlags |= STARTF_USESTDHANDLES;
324+
siEx.StartupInfo.hStdError = nullptr;
325+
siEx.StartupInfo.hStdInput = nullptr;
326+
siEx.StartupInfo.hStdOutput = nullptr;
327+
323328
SIZE_T size = 0;
324329
InitializeProcThreadAttributeList(NULL, 1, 0, &size);
325330
BYTE *attrList = new BYTE[size];

0 commit comments

Comments
 (0)