On Mon, Jan 16, 2012 at 04:50:32AM +0000, Mark Lumsden wrote: > On 15 January 2012 at 19:02 Nicholas Marriott <[email protected]> > wrote: > > > Hi > > > > I think that error message is misleading if you are running pkill as > > root. > > > > Yes, I agree. > > > How about instead of only printing if it did nothing, -l makes it always > > print "%d processes signalled"? > > Currently, the diff from Freebsd prints a line for each process that > is signalled: > > # pkill -l top > kill -15 20908 > kill -15 9439 > > I like the fact you can see which pids were affected.
I think I'd like it more if it printed the -l output in the same format as pgrep, rather than pretending it is running kill(1), but it isn't too important. > > If none are affected, I can change the message to: > > "No matching processes were found." Actually, I don't see a need for a "no processes" message at all, surely just no "kill 1234" output is enough to mean nothing? pgrep doesn't print anything when it finds nothing. > > mark
