New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"dotnet test" crashes if another process or thread has a name with a space #4452

Closed
stephentoub opened this Issue Oct 19, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@stephentoub
Member

stephentoub commented Oct 19, 2016

See dotnet/corefx#12755

Essentially, "dotnet test" calls Process.GetProcesses():

   at System.Diagnostics.Process.GetProcesses()
   at Microsoft.DotNet.Tools.Test.TestCommand.RegisterForParentProcessExit(Int32 id)
   at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)

and GetProcesses has a bug where it throws an InvalidDataException if one of the processes (or one of the threads in one of the processes) has a name that includes a space.

The GetProcesses bug is being fixed, but I suggest that RegisterForParentProcessExit be changed in the interim to catch the exception and treat it as if the parent process could not be found, rather than crashing.

@TheRealPiotrP

This comment has been minimized.

Show comment
Hide comment
@TheRealPiotrP

TheRealPiotrP Dec 5, 2016

Collaborator

System.Diagnostics.Process.GetProcesses() is no longer invoked from dotnet-test

Collaborator

TheRealPiotrP commented Dec 5, 2016

System.Diagnostics.Process.GetProcesses() is no longer invoked from dotnet-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment