make find_pid_by_name look at /proc/PID/exe too
function old new delta
procps_scan 1642 1709 +67
find_pid_by_name 193 223 +30
free_procps_scan 29 37 +8
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/include/libbb.h b/include/libbb.h
index c7b4de1..51ac69e 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1280,6 +1280,7 @@
/* Fields are set to 0/NULL if failed to determine (or not requested) */
uint16_t argv_len;
char *argv0;
+ char *exe;
IF_SELINUX(char *context;)
/* Everything below must contain no ptrs to malloc'ed data:
* it is memset(0) for each process in procps_scan() */
@@ -1327,7 +1328,7 @@
PSSCAN_COMM = 1 << 5,
/* PSSCAN_CMD = 1 << 6, - use read_cmdline instead */
PSSCAN_ARGV0 = 1 << 7,
- /* PSSCAN_EXE = 1 << 8, - not implemented */
+ PSSCAN_EXE = 1 << 8,
PSSCAN_STATE = 1 << 9,
PSSCAN_VSZ = 1 << 10,
PSSCAN_RSS = 1 << 11,