Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-02-11 07:53:14 +0300
committerChristopher Faylor <me@cgf.cx>2006-02-11 07:53:14 +0300
commit472130e8978290ef40e5f60058b1784c4149fc9e (patch)
treeb83702ad909a58384f4ee655aaf3cb3f239d7b04
parent5a8a5efcfdca8bd29d653c1aac1aece95e46c3f7 (diff)
* 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.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/fhandler_process.cc6
-rw-r--r--winsup/cygwin/pinfo.cc1
3 files changed, 9 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 71ad36626..406a45a96 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>
* times.cc (clock_getres): Use correct conversion from milliseconds to
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 28fd28c39..852e891e1 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -639,9 +639,8 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
state = 'T';
else if (wincap.is_winnt ())
state = get_process_state (p->dwProcessId);
- if (!wincap.is_winnt ())
- start_time = (GetTickCount () / 1000 - time (NULL) + p->start_time) * HZ;
- else
+ start_time = (GetTickCount () / 1000 - time (NULL) + p->start_time) * HZ;
+ if (wincap.is_winnt ())
{
NTSTATUS ret;
HANDLE hProcess;
@@ -700,7 +699,6 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
fault_count = vmc.PageFaultCount;
utime = put.UserTime.QuadPart * HZ / 10000000ULL;
stime = put.KernelTime.QuadPart * HZ / 10000000ULL;
- start_time = (put.CreateTime.QuadPart - stodi.BootTime.QuadPart) * HZ / 10000000ULL;
#if 0
if (stodi.CurrentTime.QuadPart > put.CreateTime.QuadPart)
start_time = (spt.KernelTime.QuadPart + spt.UserTime.QuadPart -
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index c71299ff0..146b43238 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -61,7 +61,6 @@ set_myself (HANDLE h)
/* here if execed */
static pinfo NO_COPY myself_identity;
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_dwProcessId = 0;
}