Commit ed566a87 authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

ntdll: Return process times in NtQuerySystemInformation(SystemProcessInformation).

parent 69e9651c
......@@ -2155,6 +2155,8 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
{
int i, j;
get_thread_times(unix_pid, -1, &spi->KernelTime, &spi->UserTime);
/* set thread info */
i = j = 0;
while (ret == STATUS_SUCCESS)
......
......@@ -833,7 +833,10 @@ BOOL get_thread_times(int unix_pid, int unix_tid, LARGE_INTEGER *kernel_time, LA
FILE *f;
int i;
sprintf( buf, "/proc/%u/task/%u/stat", unix_pid, unix_tid );
if (unix_tid == -1)
sprintf( buf, "/proc/%u/stat", unix_pid );
else
sprintf( buf, "/proc/%u/task/%u/stat", unix_pid, unix_tid );
if (!(f = fopen( buf, "r" )))
{
ERR("Failed to open %s: %s\n", buf, strerror(errno));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment