* fhandler_process.cc (format_process_stat): Use cygwin-derived start time even
on NT since it is the logical start time of the "process". * pinfo.cc (set_myself): Don't set start time when it should have already been set previously.
This commit is contained in:
		| @@ -1,3 +1,10 @@ | |||||||
|  | 2006-02-10  Christopher Faylor  <cgf@timesys.com> | ||||||
|  |  | ||||||
|  | 	* fhandler_process.cc (format_process_stat): Use cygwin-derived start | ||||||
|  | 	time even on NT since it is the logical start time of the "process". | ||||||
|  | 	* pinfo.cc (set_myself): Don't set start time when it should have | ||||||
|  | 	already been set previously. | ||||||
|  |  | ||||||
| 2006-02-10  Brian Ford  <Brian.Ford@FlightSafety.com> | 2006-02-10  Brian Ford  <Brian.Ford@FlightSafety.com> | ||||||
|  |  | ||||||
| 	* times.cc (clock_getres): Use correct conversion from milliseconds to | 	* times.cc (clock_getres): Use correct conversion from milliseconds to | ||||||
|   | |||||||
| @@ -639,9 +639,8 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize) | |||||||
|     state = 'T'; |     state = 'T'; | ||||||
|   else if (wincap.is_winnt ()) |   else if (wincap.is_winnt ()) | ||||||
|     state = get_process_state (p->dwProcessId); |     state = get_process_state (p->dwProcessId); | ||||||
|   if (!wincap.is_winnt ()) |   start_time = (GetTickCount () / 1000 - time (NULL) + p->start_time) * HZ; | ||||||
|     start_time = (GetTickCount () / 1000 - time (NULL) + p->start_time) * HZ; |   if (wincap.is_winnt ()) | ||||||
|   else |  | ||||||
|     { |     { | ||||||
|       NTSTATUS ret; |       NTSTATUS ret; | ||||||
|       HANDLE hProcess; |       HANDLE hProcess; | ||||||
| @@ -700,7 +699,6 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize) | |||||||
|       fault_count = vmc.PageFaultCount; |       fault_count = vmc.PageFaultCount; | ||||||
|       utime = put.UserTime.QuadPart * HZ / 10000000ULL; |       utime = put.UserTime.QuadPart * HZ / 10000000ULL; | ||||||
|       stime = put.KernelTime.QuadPart * HZ / 10000000ULL; |       stime = put.KernelTime.QuadPart * HZ / 10000000ULL; | ||||||
|       start_time = (put.CreateTime.QuadPart - stodi.BootTime.QuadPart) * HZ / 10000000ULL; |  | ||||||
| #if 0 | #if 0 | ||||||
|        if (stodi.CurrentTime.QuadPart > put.CreateTime.QuadPart) |        if (stodi.CurrentTime.QuadPart > put.CreateTime.QuadPart) | ||||||
| 	 start_time = (spt.KernelTime.QuadPart + spt.UserTime.QuadPart - | 	 start_time = (spt.KernelTime.QuadPart + spt.UserTime.QuadPart - | ||||||
|   | |||||||
| @@ -61,7 +61,6 @@ set_myself (HANDLE h) | |||||||
|       /* here if execed */ |       /* here if execed */ | ||||||
|       static pinfo NO_COPY myself_identity; |       static pinfo NO_COPY myself_identity; | ||||||
|       myself_identity.init (cygwin_pid (myself->dwProcessId), PID_EXECED, NULL); |       myself_identity.init (cygwin_pid (myself->dwProcessId), PID_EXECED, NULL); | ||||||
|       myself->start_time = time (NULL); /* Register our starting time. */ |  | ||||||
|       myself->exec_sendsig = NULL; |       myself->exec_sendsig = NULL; | ||||||
|       myself->exec_dwProcessId = 0; |       myself->exec_dwProcessId = 0; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user