diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-17 18:39:36 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-17 18:39:36 +0000 |
| commit | 3b3ca113ed00a6781a28172bb3a6860a5f79ea02 (patch) | |
| tree | 7834909b21af2b0fdbb7c3c52dc3fef12ba0c051 /procps/pidof.c | |
| parent | 18875bf772d72c9c543be8f9ab46dec451f547ea (diff) | |
| download | busybox-w32-3b3ca113ed00a6781a28172bb3a6860a5f79ea02.tar.gz busybox-w32-3b3ca113ed00a6781a28172bb3a6860a5f79ea02.tar.bz2 busybox-w32-3b3ca113ed00a6781a28172bb3a6860a5f79ea02.zip | |
pidof/killall: allow find_pid_by_name to find running
processes started as scripts_with_name_longer_than_15_bytes.sh
closes bug 4054 (and is generally neat)
Diffstat (limited to 'procps/pidof.c')
| -rw-r--r-- | procps/pidof.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/procps/pidof.c b/procps/pidof.c index 2519473e8..780504433 100644 --- a/procps/pidof.c +++ b/procps/pidof.c | |||
| @@ -22,7 +22,6 @@ int pidof_main(int argc UNUSED_PARAM, char **argv) | |||
| 22 | unsigned first = 1; | 22 | unsigned first = 1; |
| 23 | unsigned opt; | 23 | unsigned opt; |
| 24 | #if ENABLE_FEATURE_PIDOF_OMIT | 24 | #if ENABLE_FEATURE_PIDOF_OMIT |
| 25 | char ppid_str[sizeof(int)*3 + 1]; | ||
| 26 | llist_t *omits = NULL; /* list of pids to omit */ | 25 | llist_t *omits = NULL; /* list of pids to omit */ |
| 27 | opt_complementary = "o::"; | 26 | opt_complementary = "o::"; |
| 28 | #endif | 27 | #endif |
| @@ -39,8 +38,7 @@ int pidof_main(int argc UNUSED_PARAM, char **argv) | |||
| 39 | while (omits_p) { | 38 | while (omits_p) { |
| 40 | /* are we asked to exclude the parent's process ID? */ | 39 | /* are we asked to exclude the parent's process ID? */ |
| 41 | if (strcmp(omits_p->data, "%PPID") == 0) { | 40 | if (strcmp(omits_p->data, "%PPID") == 0) { |
| 42 | sprintf(ppid_str, "%u", (unsigned)getppid()); | 41 | omits_p->data = utoa((unsigned)getppid()); |
| 43 | omits_p->data = ppid_str; | ||
| 44 | } | 42 | } |
| 45 | omits_p = omits_p->link; | 43 | omits_p = omits_p->link; |
| 46 | } | 44 | } |
