msbuild
msbuild copied to clipboard
ToolTask class should have an overridable method which is called right after tool process is started
Steps to reproduce
There is a long standing issue when CL and Link tasks hang sometimes waiting on a pipe they create to get unicode output from the tools (the problem described here: https://docs.microsoft.com/en-us/windows/win32/ipc/pipe-handle-inheritance). To avoid this problem, the write handle of the pipe must be closed right after the tool process is created.
Currently, there is no way we can do it in a task derived from https://github.com/microsoft/msbuild/blob/master/src/Utilities/ToolTask.cs
Please add an overridable method in ToolTask class and call it in Execute() after process.Start().
Did you mean proc.Start() in the ExecuteTool?