Bug 26363

Summary: [Process] StartTime is unset for all Processes returned by Process.GetProcesses
Product: [Mono] Class Libraries Reporter: Sandy Armstrong [MSFT] <sandy>
Component: mscorlibAssignee: marcos.henrich
Status: RESOLVED FIXED    
Severity: normal CC: marcos.henrich, mono-bugs+mono
Priority: ---    
Version: 3.12.0   
Target Milestone: Untriaged   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:

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