aboutsummaryrefslogtreecommitdiff
path: root/libbb/find_pid_by_name.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* make find_pid_by_name look at /proc/PID/exe tooAlexander Shishkin2009-07-291-9/+13
| | | | | | | | | | 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>
* killall and sestatus also need ARGVN scanningDenis Vlasenko2009-02-141-7/+6
|
* - commentary typo fixBernhard Reutner-Fischer2008-09-051-1/+1
|
* pidof/killall: allow find_pid_by_name to find runningDenis Vlasenko2008-07-171-9/+34
| | | | | | processes started as scripts_with_name_longer_than_15_bytes.sh closes bug 4054 (and is generally neat)
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-2/+2
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* which: fix testsuite failureDenis Vlasenko2007-11-251-1/+1
| | | | | | pidof: do not output empty line if nothing found testsuite: disable false positive
* introduce and use bb_basename()Denis Vlasenko2007-06-301-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_basename - 26 +26 sv_main 1226 1225 -1 passwd_main 1985 1983 -2 showdirs 482 478 -4 sendCgi 1811 1807 -4 make_device 1354 1350 -4 handleIncoming 2443 2439 -4 func_name 82 78 -4 service_name 2292 2285 -7 main 909 901 -8 cmp_main 555 547 -8 test_main 434 422 -12 act 228 216 -12 find_pair 180 164 -16 rmmod_main 298 280 -18 find_pid_by_name 156 134 -22 modprobe_main 1606 1576 -30 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/16 up/down: 26/-156) Total: -130 bytes text data bss dec hex filename 734933 3028 14400 752361 b7ae9 busybox_old 734801 3028 14400 752229 b7a65 busybox_unstripped
* killall, pidof: use argv0 for process matching tooDenis Vlasenko2007-06-301-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* pidof: size optimizations (-50 bytes)Denis Vlasenko2007-06-231-0/+29
|
* replace /proc scanning code by more versatile one.Denis Vlasenko2006-11-051-3/+3
| | | | | | | Use it where appropriate. Stop scanning /etc/passwd *for every process*!!! (uid->username) top: reduce memory usage - we won't save unneeded fields from /proc info anymore. Downside: ~+250 bytes of code
* PID should be stored in pid_t, not int or long.Denis Vlasenko2006-11-011-14/+11
| | | | | find_pid_by_name() was returning 0 or -1 in last array element, but -1 was never checked. We can use just 0 intead.
* process utilities related style cleanupDenis Vlasenko2006-09-271-9/+8
|
* - fix copy'n paste errors that got introduced when switching to the shorter ↵Bernhard Reutner-Fischer2006-09-131-1/+1
| | | | | | boilerplate. No object code changes.
* - remove emacs layout block as suggested by Robert P.J. DayBernhard Reutner-Fischer2006-05-191-9/+0
| | | | - use shorter boilerplate while at it
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-2/+2
| | | | definitions. (That should only be on prototypes.)
* - size reduction of pidofBernhard Reutner-Fischer2005-10-071-1/+1
| | | | - fix typo in reverse_pidlist
* - add llist_free_one() and llist_free() to libbb; Add a bit of documentation.Bernhard Reutner-Fischer2005-10-061-18/+19
| | | | | | | - change llist_add_to_end as proposed by vodz in http://busybox.net/lists/busybox/2005-September/016411.html - remove unneeded includes, add short boilerplate and copyright to llist.c - move COMM_LEN from find_pid_by_name to libbb.h and use it in procps_status_t - add reverse_pidlist() to find_pid_by_name. Will be needed for pidof.
* A patch from Takeharu KATO to update/fix SE-Linux support.Rob Landley2005-05-031-5/+2
|
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-4/+4
|
* Joe.C writes:Eric Andersen2003-08-061-1/+5
| | | | | | | | | | | | | | | I've reported this bug in April and it still exists in 1.00-pre2. So I made patches for both 0.60.x and 1.00-pre2. The patch is very simple, just use strncmp instead of strcmp. Please apply if it is OK. Here's the procedure to test this problem: Create a executable with very long name, say 'test_1234567890123456' and execute it. Try using 'killall' or 'pidof' to find/kill this program. Without this patch, you can't find the program.
* Update a bunch of docs. Run a script to update my email addr.Eric Andersen2003-07-141-1/+1
|
* Patch from Russell Coker:Eric Andersen2003-07-031-0/+4
| | | | | I've attached my latest SE Linux patch for busybox against the latest CVS version of busybox.
* Remove cruftEric Andersen2003-05-261-2/+0
|
* Kill CONFIG_FEATURE_USE_DEVPS_PATCH and the devps patch. I'm notEric Andersen2002-12-051-83/+0
| | | | | maintaining it anymore, and it is now terribly out of date. -Erik
* Patch last_pach62 from vodz. This patch moves all the /proc parsingEric Andersen2002-10-221-44/+10
| | | | code into libbb so it can be shared by ps, top, etc, saving over 1.5k.
* If find_pid_by_name() had an error, it was returning -1, but storingEric Andersen2001-12-061-21/+9
| | | | | | | | that into a pid_t, which is unsigned on a number archs. Furthermore, find_pid_by_name() would _never_ return an error if the intended proces was "init", but instead would return 1, meaning we would fail to work on 2.4.x kernels running an initrd... -Erik
* Major rework of the directory structure and the entire build system.Eric Andersen2001-10-241-10/+4
| | | | -Erik
* Fix a stupid thinko, and fix killall to cope with the updatedEric Andersen2001-07-051-0/+2
| | | | | find_pid_by_name() interface -Erik
* Implement suggestion from Adam Slattery, (don't default to killing closing ↵Eric Andersen2001-07-051-3/+16
| | | | bug #1190.
* Make it so we don't segfault when /proc isn't mounted -- guess pid 1...Eric Andersen2001-06-261-0/+9
| | | | -Erik
* Patch from Pierre PEIFFER <pierre.peiffer@sxb.bsf.alcatel.fr>Eric Andersen2001-03-171-7/+14
| | | | | that copes with the fact that processes may have been swapped out.
* Convert utility.c into libbb.a. It is now a whole pile of .cEric Andersen2001-03-161-0/+168
files. Clean up the resulting damage and fix up the makefile. -Erik