Hello,

usually busybox's pidof retrieves gathers information from
/proc/*/{stat,cmdline}. However, when configured with

# CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_FEATURE_TOPMEM is not set

/proc/*/cmdline is not accessed anymore (verified with strace). It looks
as if this parsing check went out of sync when the preceding sscanf()
was extended:

--- libbb/procps.c.org  2008-04-19 05:50:33.000000000 +0200
+++ libbb/procps.c      2008-04-25 13:54:45.000000000 +0200
@@ -258,7 +258,7 @@
                                &sp->start_time,
                                &vsz,
                                &rss);
-                       if (n != 10)
+                       if (n != 11)
                                break;
                        /* vsz is in bytes and we want kb */
                        sp->vsz = vsz >> 10;

Regards,

Andreas
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to