Re: pgrep -x broken

2018-01-19 Thread Kamil Rytarowski
On 19.01.2018 21:24, Michael van Elst wrote: > net...@precedence.co.uk (Stephen Borrill) writes: > >> 1) Revert above and always use p_comm (and note in man page) >> 2) Use p_comm only if -x flag given: >> 3) Chop off at last /: > >> I favour 1), any dissent before I commit? > > Since pgrep -f m

Re: pgrep -x broken

2018-01-19 Thread Michael van Elst
net...@precedence.co.uk (Stephen Borrill) writes: >1) Revert above and always use p_comm (and note in man page) >2) Use p_comm only if -x flag given: >3) Chop off at last /: >I favour 1), any dissent before I commit? Since pgrep -f matches also arguments, the default should probably be to use ar

pgrep -x broken

2018-01-19 Thread Stephen Borrill
This commit broke pgrep -x as it compares against the full path in argv[0]: http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/pkill/pkill.c.diff?r1=1.27&r2=1.28&only_with_tag=MAIN&f=h # ps ax | grep inetd 1432 ?Is 0:00.00 /usr/sbin/inetd -l 20479 pts/0O+ 0:00.00 grep inetd # p