Bug 26363 - [Process] StartTime is unset for all Processes returned by Process.GetProcesses
Summary: [Process] StartTime is unset for all Processes returned by Process.GetProcesses
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: 3.12.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
URL:
Depends on:
Blocks:
 
Reported: 2015-01-23 17:06 UTC by Sandy Armstrong [MSFT]
Modified: 2015-04-06 14:51 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Sandy Armstrong [MSFT] 2015-01-23 17:06:47 UTC
1. Get a process via any method, such as Process.GetProcesses
2. Check process's StartTime property

Expected Results:

See the process's start time.

Actual results:

12/31/1600 4:00:00 PM


Example:

	var cp = Process.GetCurrentProcess ();

	foreach (var p in Process.GetProcesses ()) {
		try {
			if (p.Id != cp.Id && !p.HasExited) {
				Console.WriteLine ("Name: {0} StartTime: {1}", p.ProcessName, p.StartTime);
			}
		} catch {
		}
	}


Output excerpt:

Name: bash StartTime: 12/31/1600 4:00:00 PM
Name: bash StartTime: 12/31/1600 4:00:00 PM
Name: Terminal StartTime: 12/31/1600 4:00:00 PM
Name: CVMCompiler StartTime: 12/31/1600 4:00:00 PM
Name: thnuclnt StartTime: 12/31/1600 4:00:00 PM
Name: thnuclnt StartTime: 12/31/1600 4:00:00 PM
Name: VMware Graphics StartTime: 12/31/1600 4:00:00 PM
Name: thnuclnt StartTime: 12/31/1600 4:00:00 PM
Name: thnuclnt StartTime: 12/31/1600 4:00:00 PM
Name: thnuclnt StartTime: 12/31/1600 4:00:00 PM
Name: thnuclnt StartTime: 12/31/1600 4:00:00 PM
Name: VMware Fusion S StartTime: 12/31/1600 4:00:00 PM
Name: VMware Fusion StartTime: 12/31/1600 4:00:00 PM
Name: Activity Monito StartTime: 12/31/1600 4:00:00 PM
Name: lldb StartTime: 12/31/1600 4:00:00 PM
Name: lldb StartTime: 12/31/1600 4:00:00 PM
Comment 1 Sandy Armstrong [MSFT] 2015-01-23 17:11:59 UTC
Works on MS.NET, not Mono 3.12.0 on OS X Yosemite.
Comment 2 marcos.henrich 2015-03-10 12:27:57 UTC
Hi Sandy,

Thank you for the bug report.

The pull request for this issue can be found in the link below.
https://github.com/mono/mono/pull/1624
Comment 3 marcos.henrich 2015-04-06 14:51:06 UTC
Fixed in mono master 24748ce981a554c4a8f9529e5848a88c743a1901
https://github.com/mono/mono/commit/24748ce