Date: Thu, 4 Feb 2010 11:51:14 -0500 From: jhell <jhell@DataIX.net> To: Eitan Adler <eitanadlerlist@gmail.com> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org>, Jason Spiro <jasonspiro4@gmail.com> Subject: Re: [RFC] [patch] pkill verbose option Message-ID: <alpine.BSF.2.00.1002041150020.27763@pragry.qngnvk.ybpny> In-Reply-To: <alpine.BSF.2.00.1002041053270.78166@qvfongpu.qngnvk.ybpny> References: <a0777e081002030700l53d9cae2v74a181315ed55277@mail.gmail.com> <alpine.BSF.2.00.1002031246160.37629@pragry.qngnvk.ybpny> <loom.20100204T102100-858@post.gmane.org> <a0777e081002040201n70c20a30jcea19fc2509de6ab@mail.gmail.com> <alpine.BSF.2.00.1002041053270.78166@qvfongpu.qngnvk.ybpny>
next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1091451658-1141520619-1265302016=:27763 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed Content-ID: <alpine.BSF.2.00.1002041147051.27763@pragry.qngnvk.ybpny> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.BSF.2.00.1002041147050.27763@pragry.qngnvk.ybpny> On Thu, 4 Feb 2010 11:01, jhell@ wrote: > > On Thu, 4 Feb 2010 05:01, eitanadlerlist@ wrote: >> This patch hijacks pgrep's -l >> > [cut] > > This particular section of the patch should probably be left out until its > worked over in a way that it does not print the info message if a process has > been found and killed already. > > if (!didAction && !pgrep) > { > printf("No matching processes belonging to you were found\n"); > } > > > Thanks for the re-patch, quick and resourceful... ;) > > The attached patch is for stable/7 and does not have the above printf for no matching processes. It also cleans up the formatting a little following the rest of the code and adds the -l flag to the usage statement. This is only the patch for pkill itself and not for the manual page. ;-) - -- jhell -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLavsEAAoJEJBXh4mJ2FR+WMwH/1FQY4+FV5xLd6Lg2xgjcbG0 ptDjfr5EdIowWeE2EckcmkZGHZa6Z9WL3zcgOHBfJbsm7pchKUoAjzihlk2iW76u yBHknDs0Wysv7g0y2nA5sDmjAzzJV8xF8W7aGps+eRJYp1dSDQh9h5zRLAKqZXQ+ hmc43ZUOTYsOoMdPcHJUm48og5Q7IiVeh4B7T6PeMaFdolwW8wGwJuXjOzRw4+UH A6g+bBctFNrLIxj6eb39oxhIXoDv7unwM+JONJKJvtKWOmbVD22VVYSMeNKSOeqX 9SelPiwdBj9ulJfTuRmrpfuPw/J7CpkrIwKsifPqP3DYuKQ8qLiBO/jRJwLNkpA= =PD/9 -----END PGP SIGNATURE----- --1091451658-1141520619-1265302016=:27763 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=pkill.patch Content-Transfer-Encoding: BASE64 Content-ID: <alpine.BSF.2.00.1002041145070.27763@pragry.qngnvk.ybpny> Content-Description: Content-Disposition: ATTACHMENT; FILENAME=pkill.patch SW5kZXg6IHBraWxsLmMNCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCi0tLSBw a2lsbC5jCShyZXZpc2lvbiAxOTM2MjcpDQorKysgcGtpbGwuYwkod29ya2lu ZyBjb3B5KQ0KQEAgLTE4Miw3ICsxODIsNyBAQA0KIAlwaWRmaWxlbG9jayA9 IDA7DQogCWV4ZWNmID0gY29yZWYgPSBfUEFUSF9ERVZOVUxMOw0KIA0KLQl3 aGlsZSAoKGNoID0gZ2V0b3B0KGFyZ2MsIGFyZ3YsICJERjpHOklMTTpOOlA6 U1U6YWQ6Zmc6aWo6bG5vczp0OnU6dngiKSkgIT0gLTEpDQorCXdoaWxlICgo Y2ggPSBnZXRvcHQoYXJnYywgYXJndiwgIkRGOkc6SUxNOk46UDpTVTphZDpm ZzppbGo6bG5vczp0OnU6dngiKSkgIT0gLTEpDQogCQlzd2l0Y2ggKGNoKSB7 DQogCQ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W1d XG4iDQo= --1091451658-1141520619-1265302016=:27763--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1002041150020.27763>