diff options
author | Lauri Kasanen | 2010-12-05 05:22:29 +0100 |
---|---|---|
committer | Denys Vlasenko | 2010-12-05 05:22:29 +0100 |
commit | 6578f2cf5b97a72562b56e7d9ad5d49dee9953b0 (patch) | |
tree | 0b878f3b30f12ea3c1ab3a56a2f0952b58ce9faf /libbb | |
parent | a04440ccadbee947cb9d3f37969eea3e2c570ebf (diff) | |
download | busybox-6578f2cf5b97a72562b56e7d9ad5d49dee9953b0.zip busybox-6578f2cf5b97a72562b56e7d9ad5d49dee9953b0.tar.gz |
pstree: new applet. +1664 bytes
text data bss dec hex filename
883379 936 17192 901507 dc183 busybox_old
885043 936 17192 903171 dc803 busybox_unstripped
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/procps.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libbb/procps.c b/libbb/procps.c index 7924660..f22a55d 100644 --- a/libbb/procps.c +++ b/libbb/procps.c @@ -302,6 +302,7 @@ procps_status_t* FAST_FUNC procps_scan(procps_status_t* sp, int flags) goto got_entry; closedir(sp->task_dir); sp->task_dir = NULL; + sp->main_thread_pid = 0; } #endif entry = readdir(sp->dir); @@ -321,6 +322,7 @@ procps_status_t* FAST_FUNC procps_scan(procps_status_t* sp, int flags) char task_dir[sizeof("/proc/%u/task") + sizeof(int)*3]; sprintf(task_dir, "/proc/%u/task", pid); sp->task_dir = xopendir(task_dir); + sp->main_thread_pid = pid; continue; } #endif |