Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

System.Diagnostics.Process has a different behavior on non-Windows platforms #248

Merged
merged 3 commits into from
Nov 17, 2017
Merged

System.Diagnostics.Process has a different behavior on non-Windows platforms #248

merged 3 commits into from
Nov 17, 2017

Conversation

jorive
Copy link
Member

@jorive jorive commented Nov 16, 2017

  • The Process.StartTime throw System.ComponentModel.Win32Exception on Linux because the data is not available once the process exits.

…ndows platforms.

- The Process.[StartTime/ExitTime] throw `System.ComponentModel.Win32Exception` on Linux. The API is exposing OS information that is not available once the process exits.
@jorive jorive requested a review from brianrob November 16, 2017 20:29
StartTime = process.StartTime;
ExitTime = process.ExitTime;

if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change here seems reasonable to me, but I think rather than special casing Windows, just do the same thing on all platforms. Otherwise, our methodology is different between operating systems, and that makes both the harness and data interpretation more complicated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, makes sense.

@jorive jorive merged commit 2090f20 into microsoft:master Nov 17, 2017
@jorive jorive deleted the dev/scenario-on-linux-bug-fix branch November 17, 2017 00:16
johnbeisner pushed a commit to johnbeisner/sdk that referenced this pull request Jan 9, 2018
johnbeisner added a commit to dotnet/sdk that referenced this pull request Jan 24, 2018
* First draft enabling performance tests...

* Disabling tests for non-Windows...

* Updates...

* Missing "\"

* Set 'DefaultIterations' to "1"

* Resolved BUG: microsoft/xunit-performance#248

* Fixing typos...

* Formatting, variable names changes.

* Fixing a typo...
johnbeisner pushed a commit to dotnet/sdk that referenced this pull request Jan 30, 2018
* First draft enabling performance tests...

* Resolved BUG: microsoft/xunit-performance#248
johnbeisner pushed a commit to dotnet/sdk that referenced this pull request Feb 7, 2018
* First draft enabling performance tests...

* Disabling tests for non-Windows...

* Updates...

* Missing "\"

* Set 'DefaultIterations' to "1"

* Resolved BUG: microsoft/xunit-performance#248

* Fixing typos...

* Formatting, variable names changes.

* Fixing a typo...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants