aboutsummaryrefslogtreecommitdiff
path: root/procps/pgrep.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'busybox' into mergeRon Yorston2023-07-131-2/+2
|\
| * Update applet size estimatesDenys Vlasenko2023-07-101-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | pgrep,pkill: remove non-functional optionsRon Yorston2023-06-221-0/+55
|/ | | | | | | | | | | | | | | | Due to limitations of the process scanning code on Windows some features of pgrep and pkill don't work properly: - display/matching of the full command line (-a/-f) - killing the oldest or newest process (-o/-n) - matching session id (-s) To avoid disappointment or error support for these features has been removed. Saves 408-464 bytes.
* pkill: add -e to display the name and PID of the process being killedLouis Sautier2022-10-141-4/+11
| | | | | | | | | | | | | This mimics the behaviour of pkill -e / --echo from procps. function old new delta .rodata 105179 105200 +21 packed_usage 34523 34516 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 21/-7) Total: 14 bytes Signed-off-by: Louis Sautier <sautier.louis@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: more --help tweakingDenys Vlasenko2021-06-131-6/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: update size informationDenys Vlasenko2018-12-281-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* free,stat: make NOEXECDenys Vlasenko2017-08-071-1/+5
| | | | | | pkill/pgrep/pidof uncovered another quirk: what about noexec's _process names_? Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pgrep: fix "pgrep -v -P1"; also allow matching of comm - closes 10086Denys Vlasenko2017-07-211-10/+37
| | | | | | | function old new delta pgrep_main 662 720 +58 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-2/+2
| | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-181-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pgrep: implement -aDenys Vlasenko2017-06-261-6/+16
| | | | | | | function old new delta pgrep_main 640 726 +86 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pgrep: fix pgrep -flx "sleep 11" - saw "sleep 11" processes as "sleep 11 "Denys Vlasenko2017-06-261-5/+11
| | | | | | | function old new delta pgrep_main 584 597 +13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add comment about APPLET_ODDNAME formatDenys Vlasenko2017-01-291-0/+1
| | | | | | It confused me more than once Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Code style fixes, no code changesDenys Vlasenko2016-11-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Convert all procps/* applets to "new style" applet definitionsDenys Vlasenko2016-11-231-0/+17
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LISTDenys Vlasenko2016-07-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many cases, this aqllows to drop use of opt_complementary. Approximately -400 bytes: function old new delta getopt32 1423 1502 +79 opt_string 17 18 +1 OPT_STR 24 25 +1 uniq_main 416 406 -10 timeout_main 279 269 -10 sulogin_main 270 260 -10 readprofile_main 1825 1815 -10 ps_main 543 533 -10 pidof_main 245 235 -10 pgrep_main 611 601 -10 od_main 2600 2590 -10 mkfs_minix_main 2684 2674 -10 mkfs_ext2_main 2603 2593 -10 microcom_main 712 702 -10 makemime_main 315 305 -10 ionice_main 282 272 -10 inetd_main 2074 2064 -10 ifplugd_main 1144 1134 -10 halt_main 353 343 -10 getopt_main 636 626 -10 fdisk_main 2854 2844 -10 env_main 206 196 -10 dmesg_main 319 309 -10 conspy_main 1214 1204 -10 awk_main 981 971 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220) Total: -139 bytes text data bss dec hex filename 919373 906 14060 934339 e41c3 busybox_old 918969 906 14060 933935 e402f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Use unsigned printf/scanf conversion where more appropriateDenys Vlasenko2013-11-291-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pgrep: fix a "missing closing paren" build errorDenys Vlasenko2013-02-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pgrep: fix -x optionBernhard Walle2013-02-281-1/+1
| | | | | | | | | | | | | | Because when -x is used (exact match), then we cannot compile the regular expression with REG_NOSUB. The manual page regcomp(3) states in section "Byte offsets": Unless REG_NOSUB was set for the compilation of the pattern buffer, it is possible to obtain substring match addressing information. The problem was detected on an ARM system with glibc 2.16. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pkill/pgrep: support extended regular expressionsWade Berrier2011-06-101-1/+1
| | | | | | | | Done by enabling the REG_EXTENDED and REG_NOSUB regex flags, which also increases compatibility with the procps versions. Signed-off-by: Wade Berrier <wade_berrier@appsig.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-2/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move remaining help text from include/usage.src.hPere Orga2011-04-111-0/+29
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: 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>
* *: style fixes. no code changes (verified with objdump)Denys Vlasenko2010-01-281-3/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pgrep: match argv[0] too, not only comm; fix a bug in argv sanitizationDenys Vlasenko2009-08-141-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pgrep/pkill: support -s and -P optionsDenys Vlasenko2009-07-061-54/+64
| | | | | | | | | | | | function old new delta pgrep_main 510 580 +70 packed_usage 26575 26616 +41 act 234 236 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 113/0) Total: 113 bytes Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pidof/killall: allow find_pid_by_name to find runningDenis Vlasenko2008-07-171-1/+8
| | | | | | processes started as scripts_with_name_longer_than_15_bytes.sh closes bug 4054 (and is generally neat)
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-1/+1
|
* more of -Wall fixes from Cristian Ionescu-Idbohrn.Denis Vlasenko2008-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some are fixing real bugs. function old new delta syslogd_main 938 958 +20 get_signum 136 143 +7 obj_load 777 782 +5 recv_from_to 210 214 +4 get_next_block 1795 1799 +4 display_topmem_process_list 1117 1121 +4 logread_main 484 487 +3 buffer_fill_and_print 73 76 +3 kill_main 687 689 +2 ll_remember_index 240 241 +1 do_stats 452 453 +1 if_readconf 166 165 -1 display_process_list 1192 1191 -1 run_applet_and_exit 507 505 -2 print_signames 33 31 -2 parse_one_line 1092 1090 -2 find_out_spec 57 55 -2 add_ksymoops_symbols 421 419 -2 ash_main 1407 1402 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17) Total: 37 bytes
* patch: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com> (-80 bytes)Denis Vlasenko2008-03-231-2/+0
| | | | | *: removal of #include <getopt.h>
* *: add -Wunused-parameter; fix resulting breakageDenis Vlasenko2008-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
* dos2unix: tiny shrinkDenis Vlasenko2008-03-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | login,su: fix setup_environment() so that it works as intended (parameter names were a bit misleading) fdisk: shrink help text: shrink function old new delta login_main 1658 1701 +43 setup_environment 206 203 -3 dos_compatible_flag 4 1 -3 dos2unix_main 383 375 -8 get_boot 1724 1702 -22 fdisk_main 2949 2889 -60 packed_usage 24250 23948 -302 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 43/-398) Total: -355 bytes text data bss dec hex filename 798768 661 7428 806857 c4fc9 busybox_old 798327 658 7428 806413 c4e0d busybox_unstripped
* ps: fix build breakage from vda's recent commitDenis Vlasenko2008-01-071-1/+1
| | | | | *: whitespace fixes
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* fixlet to pgrep/pkillDenis Vlasenko2007-09-301-1/+1
|
* print_signames_and_exit -> print_signames (because of "ash calls kill_main")Denis Vlasenko2007-09-301-2/+4
|
* pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>Denis Vlasenko2007-09-291-0/+136