aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-06-30 08:03:26 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-06-30 08:03:26 +0000
commitf7d07b1723c15ee818f0c1f5cce96c55274024a6 (patch)
treeb7f847c25ce3705d315ce4f0ac1b7976fae58cc6 /include
parent42ee26d00cc9c9a6cf1f652a5351b30ac221fa34 (diff)
downloadbusybox-w32-f7d07b1723c15ee818f0c1f5cce96c55274024a6.tar.gz
busybox-w32-f7d07b1723c15ee818f0c1f5cce96c55274024a6.tar.bz2
busybox-w32-f7d07b1723c15ee818f0c1f5cce96c55274024a6.zip
killall, pidof: use argv0 for process matching too
top: show cmdline, not comm field (fixes problems with re-execed applets showing as processes with name "exe", and not being found by pidof/killall by applet name) function old new delta find_pid_by_name 98 156 +58 procps_scan 692 732 +40 top_main 2724 2762 +38 find_pair 164 180 +16 collect_int 114 123 +9 cmp_main 547 555 +8 collect_fork 112 119 +7 collect_ctx 112 119 +7 read_package_field 253 257 +4 passwd_main 1983 1985 +2 process_stdin 435 433 -2 xstrtoul_range_sfx 229 226 -3 get_next_block 1852 1849 -3 arith 2042 2033 -9 sv_main 1236 1226 -10 singlemount 4690 4672 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 10/6 up/down: 189/-45) Total: 144 bytes text data bss dec hex filename 734789 3028 14400 752217 b7a59 busybox_old 734933 3028 14400 752361 b7ae9 busybox_unstripped
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 124b11fa8..e80e76403 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -836,6 +836,8 @@ typedef struct {
836 DIR *dir; 836 DIR *dir;
837/* Fields are set to 0/NULL if failed to determine (or not requested) */ 837/* Fields are set to 0/NULL if failed to determine (or not requested) */
838 char *cmd; 838 char *cmd;
839 char *argv0;
840 /*char *exe;*/
839 USE_SELINUX(char *context;) 841 USE_SELINUX(char *context;)
840 /* Everything below must contain no ptrs to malloc'ed data: 842 /* Everything below must contain no ptrs to malloc'ed data:
841 * it is memset(0) for each process in procps_scan() */ 843 * it is memset(0) for each process in procps_scan() */
@@ -861,13 +863,15 @@ enum {
861 PSSCAN_UIDGID = 1 << 4, 863 PSSCAN_UIDGID = 1 << 4,
862 PSSCAN_COMM = 1 << 5, 864 PSSCAN_COMM = 1 << 5,
863 PSSCAN_CMD = 1 << 6, 865 PSSCAN_CMD = 1 << 6,
864 PSSCAN_STATE = 1 << 7, 866 PSSCAN_ARGV0 = 1 << 7,
865 PSSCAN_VSZ = 1 << 8, 867 PSSCAN_EXE = 1 << 8, /* not implemented yet */
866 PSSCAN_RSS = 1 << 9, 868 PSSCAN_STATE = 1 << 9,
867 PSSCAN_STIME = 1 << 10, 869 PSSCAN_VSZ = 1 << 10,
868 PSSCAN_UTIME = 1 << 11, 870 PSSCAN_RSS = 1 << 11,
869 PSSCAN_TTY = 1 << 12, 871 PSSCAN_STIME = 1 << 12,
870 USE_SELINUX(PSSCAN_CONTEXT = 1 << 13,) 872 PSSCAN_UTIME = 1 << 13,
873 PSSCAN_TTY = 1 << 14,
874 USE_SELINUX(PSSCAN_CONTEXT = 1 << 15,)
871 /* These are all retrieved from proc/NN/stat in one go: */ 875 /* These are all retrieved from proc/NN/stat in one go: */
872 PSSCAN_STAT = PSSCAN_PPID | PSSCAN_PGID | PSSCAN_SID 876 PSSCAN_STAT = PSSCAN_PPID | PSSCAN_PGID | PSSCAN_SID
873 | PSSCAN_COMM | PSSCAN_STATE 877 | PSSCAN_COMM | PSSCAN_STATE