Inline CreateProcessW impl at callsites and cleanup#127604
Inline CreateProcessW impl at callsites and cleanup#127604am11 wants to merge 5 commits intodotnet:mainfrom
Conversation
|
/cc @janvorli |
|
I see the following callers of CreateProcess: src\coreclr\debug\di\dbgtransportmanager.cpp(175):BOOL result = WszCreateProcess(lpApplicationName,
I would push all the implementation to here if needed. Also, this is the only place that uses OpenProcess that should be deleted and moved to here as well. I do not think that the technique to use shell to launch the process is going to work here. The debugger is not going to be happy about the intermediate process. src\coreclr\debug\di\windowspipeline.cpp(145):BOOL ret = ::WszCreateProcess(
src\coreclr\debug\ee\debugger.cpp(6661):fCreateSucceeded = WszCreateProcess(NULL, const_cast<WCHAR*> (wszDbgCommand),
src\coreclr\vm\excep.cpp(3412):if (WszCreateProcess(NULL, lpCommandLine, NULL, NULL, TRUE, 0, NULL, NULL, &StartupInfo, &processInformation))
src\coreclr\vm\autotrace.cpp:
|
I looked this earlier and it was touched in dotnet/coreclr#21068. |
Once #127604 (comment) is confirmed, we can delete it wholesale. |
|
@janvorli, any concerns about using |
Sadly this is a huge rat's nest - "we hates it!" 😱 The The above It isn't clear why one would use the former or the latter because the entire contract of |
+1
This CI doesn't run the code in question. Sorry. This is something we'd need to validate in another repo. /cc @dotnet/dotnet-diag @steveisok |
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
|
@am11 I think the best way to make progress is to add |
I believe DbgTransportTarget::CreateProcess is dead code, as is the ICorDebug::CreateProcess API that leads to it. @jkotas' suggested test will be good confirmation. When we moved to .NET Core circa 2015 dbgshim's CreateProcessForLaunch API became the supported way to launch a .NET Core app for debugging. Mscordbi doesn't load until after the debuggee is already running. The only reason DbgTransportTarget::CreateProcess appears in the cross platform code is because it was part of Mac Silverlight work that was also cross-platform but predates .NET Core. |
#126888 (comment)