Address feedback from #78648#78880
Conversation
| CreateNoWindow = true, | ||
| UseShellExecute = false, | ||
| RedirectStandardInput = redirectStandardInput, | ||
| RedirectStandardInput = true, |
There was a problem hiding this comment.
We probably then need to have an explicit close of the standard input stream; otherwise something that were to try to read is now going to wait (forever) for that to complete.
There was a problem hiding this comment.
The component which would block, is the child dotnet process which is calling Console.ReadLine() or similar, right?
Are you asking to bring back a flag like bool leaveStandardInputOpen or some such, so that this component can close it if needed?
There was a problem hiding this comment.
The component which would block, is the child dotnet process which is calling Console.ReadLine() or similar, right?
Yep.
If we don't say to redirect, we'll be sharing the stdin from the parent process...which if the user is lucky, reading from it will fail. Note emphasis on lucky, because the alterative is an undiagnosable hang. If we redirect and don't close it, we'll definitely hang. So without the other line this might make things worse.
And of course @dibarbet might have other thoughts here too.
Follow up to #78648