projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ash: add INT_OFF/ON around allocations
[oweals/busybox.git]
/
procps
/
pstree.c
diff --git
a/procps/pstree.c
b/procps/pstree.c
index ed1a4128950dbd65bc1015fede1217174512bbb2..f97e99639f3303b46a944c189224faa823a51330 100644
(file)
--- 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)
static void mread_proc(void)
{
procps_status_t *p = NULL;
static void mread_proc(void)
{
procps_status_t *p = NULL;
+#if ENABLE_FEATURE_SHOW_THREADS
pid_t parent = 0;
pid_t parent = 0;
+#endif
int flags = PSSCAN_COMM | PSSCAN_PID | PSSCAN_PPID | PSSCAN_UIDGID | PSSCAN_TASKS;
while ((p = procps_scan(p, flags)) != NULL) {
int flags = PSSCAN_COMM | PSSCAN_PID | PSSCAN_PPID | PSSCAN_UIDGID | PSSCAN_TASKS;
while ((p = procps_scan(p, flags)) != NULL) {
@@
-368,7
+370,9
@@
static void mread_proc(void)
#endif
{
add_proc(p->comm, p->pid, p->ppid, p->uid/*, 0*/);
#endif
{
add_proc(p->comm, p->pid, p->ppid, p->uid/*, 0*/);
+#if ENABLE_FEATURE_SHOW_THREADS
parent = p->pid;
parent = p->pid;
+#endif
}
}
}
}
}
}
@@
-381,7
+385,7
@@
int pstree_main(int argc UNUSED_PARAM, char **argv)
INIT_G();
INIT_G();
-
get_terminal_width_height(0, &G.output_width, NULL
);
+
G.output_width = get_terminal_width(0
);
opt_complementary = "?1";
getopt32(argv, "p");
opt_complementary = "?1";
getopt32(argv, "p");