summaryrefslogtreecommitdiffstats
path: root/usr.bin/pkill (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use uid_from_user(3) and gid_from_group(3) in utilities thatmillert2018-09-161-7/+7
| | | | do repeated lookups. OK tb@
* clarify that patterns are extended regular expressions; ok millert@ phessler@naddy2018-08-311-3/+3
|
* remove redundant variable declarations in Makefiles, since those areespie2017-07-091-3/+1
| | | | | | the default. okay millert@
* - mark delim variable as const. it is a literal string;gsoares2016-10-101-20/+17
| | | | | | | | | | | - no need to declare main() prototype; - mark all functions as static; - add __dead marker to usage(), since it doesn't return; - zap extern *optarg/optind in main(), It is already done in unistd.h; - return from main instead of exit(3) that enables stack protector; - fix err() eval in pledge()s error path. OK millert@
* for some time now mandoc has not required MLINKS to functionjmc2016-03-301-2/+1
| | | | | | | | | | | | correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
* fix a regression spotted by chris@. the -f and -I arguments fetch processderaadt2015-10-111-5/+10
| | | | | | | arguments using kvm_getargs, after the pledge() has been made. someone brave should refactor this, hoisting the argument fetching to between kvm_getprocs() and pledge() - storing the argument data as neccessary. the current situation is also a race -- it fetches the data twice.
* pkill has to get all the getopt, getpwuid, libkvm stuff out of the wayderaadt2015-10-101-1/+6
| | | | | | first. it can pledge to "stdio" (pgrep case) or "stdio proc" (pkill case) before parsing and matching the expression. ok doug
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-3/+3
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* calloc, from peter malonetedu2014-05-071-3/+2
|
* simpler prototype repairsderaadt2013-11-121-1/+3
|
* Stop merging the per-thread and per-process flags when reportingguenther2013-09-221-2/+2
| | | | | | | | them via sysctl(KERN_PROC). In struct kinfo_proc the per-process flags move to p_psflags, leaving the per-thread flags in p_flags. Flag descriptions in ps(1) updated to be less obtuse. discussed with matthew@ some time ago; ok jca@, manpage bits ok jmc@
* use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@schwarze2013-07-161-3/+3
|
* sort options list;jmc2013-06-031-3/+3
|
* -I to confirm pkills. ok manytedu2013-06-032-30/+67
|
* properly handle the case where a process has disappeared in between grep'inghalex2012-12-121-12/+22
| | | | | | and printing it discussed with and ok millert@
* Missing "-q" in usage().ajacoutot2012-08-211-3/+3
| | | | ok espie@
* Sort options.ajacoutot2012-08-211-8/+8
| | | | "obviously okay" espie@
* add -q "silent" option similar to grepespie2012-08-212-8/+21
| | | | okay ajacoutot@, guenther@
* make pkill -l print the proper processes also when the invert (-v)halex2012-07-101-7/+4
| | | | | | flag is passed ok lum@
* Remove a check made superfluous by the KERN_PROC_SHOW_THREADS flag.guenther2012-04-211-3/+1
| | | | | | This lets new binaries work (at least w/o the -H option) with old kernels. ok pirofti@ deraadt@
* Add per thread accounting, mainly for usage & friends.pirofti2012-04-121-1/+3
| | | | | | | | | | | | | | This expands the already bloated FILL_KPROC macro to take an extra parameter that indicates if the callee is a thread or a process. The userland bits are adjusted accordingly and ps(1) and top(1) now display per thread usage times when -H is used. Also pkill(1) had to be adjusted so that duplicates don't pop up. libkvm does basically the same thing as the kernel bits. Okay guenther@.
* Teach pgrep/pkill to only match processes, not threads. ok guenther@sthen2012-03-131-4/+7
|
* Remove unused variable. Added in 1.20 by me.lum2012-03-011-6/+2
|
* exit usage() with STATUS_BADUSAGE rather than STATUS_ERROR, per the man page;jmc2012-02-161-2/+2
| | | | | fix proposed by lum actually happened in netbsd -r1.16, some 6 years ago; ok lum
* avoid usage() warping onto the next line;jmc2012-02-151-3/+3
|
* restrict pkill/pgrep to the routing domain specified by -T; ok henning@, mpf@markus2012-02-092-7/+35
|
* Allow pkill to use the -l option. This displays which processes have beenlum2012-01-172-11/+14
| | | | | | | | signalled using the "Long" format, like pgrep. Original diff from FreeBSD, modified somewhat on tech@, with feedback from nicm@ Man page input from jmc@
* Switch back from KERN_PROC2/kinfo_proc2 to KERN_PROC/kinfo_proc nowguenther2011-04-101-12/+12
| | | | | | that we've got name we want for the API we want "ZAP!" deraadt@
* various EXIT STATUS fixes; from Daniel Dickmanjmc2010-09-291-4/+5
|
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-5/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* document how patterns are matched and that only the first 16 charsjmc2009-07-271-2/+16
| | | | | | | | | are tracked to match the command name; pointed out by fgsch diff adapted from text from gad@freebsd ok fgsch sobrado millert
* tweak -v; from Tim van der Molenjmc2009-06-071-4/+4
|
* fix a few typographical errors found by spell(1).sobrado2009-03-261-4/+4
| | | | ok dtucker@, jmc@
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-262-18/+4
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* bump Mdocdate for pages committed in "febuary", necessary becausejmc2008-02-111-2/+2
| | | | of a typo in rcs.c;
* Add add -o flag to pkill/pgrep like on Solaris and Linux.millert2008-02-072-16/+35
| | | | OK jmc@ henning@ oga@ mikeb@
* "signal" is an argument, not a flag;jmc2007-10-311-4/+4
| | | | originally requested by sobrado, and now Pierre Riteau
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* Use S_IS* macros insted of masking with S_IF* flags. The latter mayotto2006-09-191-3/+3
| | | | | have multiple bits set, which lead to surprising results. Spotted by Paul Stoeber, more to come. ok millert@ pedro@ jaredy@ djm@
* - basic cleanupjmc2005-07-161-6/+10
| | | | - do not use EXIT STATUS (non-standard in section 1)
* sort options and sync usage();jmc2005-07-162-24/+24
|
* Don't print an empty line when no match is found in pgrep mode.otto2005-05-201-3/+3
| | | | ok millert@ robert@
* handle snprintf return value overflow case; ok ottoderaadt2005-04-111-3/+5
|
* revert r1.9; this one needs more discussionrobert2005-03-272-15/+9
|
* add a -i option to ignore case distinctions in the process match;robert2005-03-272-9/+15
| | | | From: NetBSD; ok millert@
* Report non-existing user or groupname correctly. From David Brownleeotto2005-03-021-6/+4
| | | | <abs@netbsd>. ok millert@
* Fix -d option; it should print a newline at EOL, not the specified delimeter.millert2005-02-111-10/+14
| | | | Problem found and OK by robert@
* handle snprintf -1; otto okderaadt2004-12-291-3/+7
|
* Don't print a warning if kill(2) returns ESRCH since the process may havemillert2004-07-151-3/+3
| | | | | | died on its own in the time between when the process list was consulted and when we do the actual kill. This fixes an annoyance for privsep processes (and others) where when you kill one the others die by themselves.
* Skip SYSTEM and ourown proccess on every loop.mpech2004-07-151-7/+4
| | | | millert@, otto@