aboutsummaryrefslogtreecommitdiff
path: root/procps/pstree.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/pstree.c')
-rw-r--r--procps/pstree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/procps/pstree.c b/procps/pstree.c
index c5fb83688..f97e99639 100644
--- a/procps/pstree.c
+++ b/procps/pstree.c
@@ -357,7 +357,9 @@ static void handle_thread(const char *comm, pid_t pid, pid_t ppid, uid_t uid)
357static void mread_proc(void) 357static void mread_proc(void)
358{ 358{
359 procps_status_t *p = NULL; 359 procps_status_t *p = NULL;
360#if ENABLE_FEATURE_SHOW_THREADS
360 pid_t parent = 0; 361 pid_t parent = 0;
362#endif
361 int flags = PSSCAN_COMM | PSSCAN_PID | PSSCAN_PPID | PSSCAN_UIDGID | PSSCAN_TASKS; 363 int flags = PSSCAN_COMM | PSSCAN_PID | PSSCAN_PPID | PSSCAN_UIDGID | PSSCAN_TASKS;
362 364
363 while ((p = procps_scan(p, flags)) != NULL) { 365 while ((p = procps_scan(p, flags)) != NULL) {
@@ -368,7 +370,9 @@ static void mread_proc(void)
368#endif 370#endif
369 { 371 {
370 add_proc(p->comm, p->pid, p->ppid, p->uid/*, 0*/); 372 add_proc(p->comm, p->pid, p->ppid, p->uid/*, 0*/);
373#if ENABLE_FEATURE_SHOW_THREADS
371 parent = p->pid; 374 parent = p->pid;
375#endif
372 } 376 }
373 } 377 }
374} 378}