msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

ToolTask class should have an overridable method which is called right after tool process is started

Open olgaark opened this issue 7 years ago • 1 comments

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().

olgaark avatar Aug 13 '19 17:08 olgaark

Did you mean proc.Start() in the ExecuteTool?

Forgind avatar Oct 14 '19 23:10 Forgind