aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-03-28 13:23:53 +0100
committerRon Yorston <rmy@pobox.com>2018-03-28 13:23:53 +0100
commit49ef6618c2e101953032b2c660bf7b246d07ce2d (patch)
tree7f1bb4069f0968f56ca721871ac3965eb6b1b519 /win32
parent9348221cef7762c2f5814f50b18c6a79701f5cda (diff)
downloadbusybox-w32-49ef6618c2e101953032b2c660bf7b246d07ce2d.tar.gz
busybox-w32-49ef6618c2e101953032b2c660bf7b246d07ce2d.tar.bz2
busybox-w32-49ef6618c2e101953032b2c660bf7b246d07ce2d.zip
ps: clear status for each process
The original procps_scan function takes care to clear the status information before handling each process. Do the same for the WIN32 version. This requires moving the snapshot handle to the part of the structure that isn't cleared on each iteration.
Diffstat (limited to 'win32')
-rw-r--r--win32/process.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/win32/process.c b/win32/process.c
index 84613cfdb..e835be63a 100644
--- a/win32/process.c
+++ b/win32/process.c
@@ -433,6 +433,8 @@ UNUSED_PARAM
433 } 433 }
434 } 434 }
435 435
436 memset(&sp->vsz, 0, sizeof(*sp) - offsetof(procps_status_t, vsz));
437
436#if ENABLE_FEATURE_PS_TIME || ENABLE_FEATURE_PS_LONG 438#if ENABLE_FEATURE_PS_TIME || ENABLE_FEATURE_PS_LONG
437 if (flags & (PSSCAN_STIME|PSSCAN_UTIME|PSSCAN_START_TIME)) { 439 if (flags & (PSSCAN_STIME|PSSCAN_UTIME|PSSCAN_START_TIME)) {
438 HANDLE proc; 440 HANDLE proc;