diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-14 01:36:11 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-14 01:36:11 +0000 |
commit | 9f00e0578167e63e161c38d1fa41b93071616b6c (patch) | |
tree | c18b05323e939d6e8736297b33dbb4b2ce5e495f | |
parent | d63cd1bf1cec62dcdfaf89e821b55c4d80421ba6 (diff) | |
download | busybox-w32-9f00e0578167e63e161c38d1fa41b93071616b6c.tar.gz busybox-w32-9f00e0578167e63e161c38d1fa41b93071616b6c.tar.bz2 busybox-w32-9f00e0578167e63e161c38d1fa41b93071616b6c.zip |
killall and sestatus also need ARGVN scanning
-rw-r--r-- | include/libbb.h | 8 | ||||
-rw-r--r-- | libbb/find_pid_by_name.c | 13 |
2 files changed, 13 insertions, 8 deletions
diff --git a/include/libbb.h b/include/libbb.h index 0403281c6..eefc13261 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1281,7 +1281,13 @@ enum { | |||
1281 | PSSCAN_UTIME = 1 << 13, | 1281 | PSSCAN_UTIME = 1 << 13, |
1282 | PSSCAN_TTY = 1 << 14, | 1282 | PSSCAN_TTY = 1 << 14, |
1283 | PSSCAN_SMAPS = (1 << 15) * ENABLE_FEATURE_TOPMEM, | 1283 | PSSCAN_SMAPS = (1 << 15) * ENABLE_FEATURE_TOPMEM, |
1284 | PSSCAN_ARGVN = (1 << 16) * (ENABLE_PGREP || ENABLE_PKILL || ENABLE_PIDOF), | 1284 | /* NB: used by find_pid_by_name(). Any applet using it |
1285 | * needs to be mentioned here. */ | ||
1286 | PSSCAN_ARGVN = (1 << 16) * (ENABLE_KILLALL | ||
1287 | || ENABLE_PGREP || ENABLE_PKILL | ||
1288 | || ENABLE_PIDOF | ||
1289 | || ENABLE_SESTATUS | ||
1290 | ), | ||
1285 | USE_SELINUX(PSSCAN_CONTEXT = 1 << 17,) | 1291 | USE_SELINUX(PSSCAN_CONTEXT = 1 << 17,) |
1286 | PSSCAN_START_TIME = 1 << 18, | 1292 | PSSCAN_START_TIME = 1 << 18, |
1287 | PSSCAN_CPU = 1 << 19, | 1293 | PSSCAN_CPU = 1 << 19, |
diff --git a/libbb/find_pid_by_name.c b/libbb/find_pid_by_name.c index 92d6d0254..600d4e1a8 100644 --- a/libbb/find_pid_by_name.c +++ b/libbb/find_pid_by_name.c | |||
@@ -67,15 +67,14 @@ static int comm_match(procps_status_t *p, const char *procName) | |||
67 | return 1; | 67 | return 1; |
68 | } | 68 | } |
69 | 69 | ||
70 | /* find_pid_by_name() | 70 | /* This finds the pid of the specified process. |
71 | * Currently, it's implemented by rummaging through | ||
72 | * the proc filesystem. | ||
71 | * | 73 | * |
72 | * Modified by Vladimir Oleynik for use with libbb/procps.c | 74 | * Returns a list of all matching PIDs |
73 | * This finds the pid of the specified process. | 75 | * It is the caller's duty to free the returned pidlist. |
74 | * Currently, it's implemented by rummaging through | ||
75 | * the proc filesystem. | ||
76 | * | 76 | * |
77 | * Returns a list of all matching PIDs | 77 | * Modified by Vladimir Oleynik for use with libbb/procps.c |
78 | * It is the caller's duty to free the returned pidlist. | ||
79 | */ | 78 | */ |
80 | pid_t* FAST_FUNC find_pid_by_name(const char *procName) | 79 | pid_t* FAST_FUNC find_pid_by_name(const char *procName) |
81 | { | 80 | { |