Closed bradwilson closed 6 years ago
The issue with this one is that it will throw if the instance is a remote process, which is not the typical case. While ideally we need a better handling for the cases depending on usage context for now we will decide such cases based on what we think is the typical usage. In this case this should be suppressed (there a bunch of related ones).
Actually there is no way to create a Process
associated to a remote machine on any Unix. So this one and many others for Process
are really false positives. We should have a rule to have a warning for the methods below on any Unix:
public static Process GetProcessById(int processId, string machineName)
public static Process[] GetProcesses(string machineName)
public static Process[] GetProcessesByName(string processName, string machineName)
HasExited
is also being reported but works.
Thanks @springy76. Just for the record HasExited
was part of PR #82 and it is fixed now.
This does not appear correct.
dotnet xunit
usesProcess.ExitCode
successfully on Linux and macOS via .NET Core.