From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 4 02:53:03 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66949106568F for ; Thu, 4 Feb 2010 02:53:03 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id 144EE8FC13 for ; Thu, 4 Feb 2010 02:53:02 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so116301qwd.7 for ; Wed, 03 Feb 2010 18:53:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=tX8oC2+F8/TX3WTh5R8EyQO2Fl0TExqQ+QyHuMoJagM=; b=toXTns8/3R68IafqnuIMnKG/iRU+qtyRZukUKNAiujZU6JK7WAYgZI0dD95Ha7hm1M DOsHctv5bBzoMJbECjSKF5xqEWBIyX+kFOVq7jglpUAfawdySXLBnEjgEVaOWFMC86oJ y8jgemxRwMFl2/1gD4DiL5+SWLEeEdcnIZTlk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=BBiga6cP6kU3TIAAE5DWpF4JYmBv05GJ+vYz0xwjEmaXYgNl3XZUoYMtcGxqQQ2Yjm iiStUCR7cCrVaawtN/yixgAhajYiT5FR8B78Ht8n7BWnKkHqDMToh5aI6Nh62hi7UR1+ CBKkYhpy3nBaf2IUE2pghAL2FD7FYKLcLyUpg= Received: by 10.224.79.166 with SMTP id p38mr3366644qak.238.1265251978577; Wed, 03 Feb 2010 18:52:58 -0800 (PST) Received: from ppp-21.93.dialinfree.com (ppp-21.93.dialinfree.com [209.172.21.93]) by mx.google.com with ESMTPS id 6sm13043376qwk.10.2010.02.03.18.52.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Feb 2010 18:52:57 -0800 (PST) Sender: "J. Hellenthal" Date: Wed, 3 Feb 2010 21:52:33 -0500 From: jhell To: Eitan Adler In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: [RFC] [patch] pkill verbose option X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 02:53:03 -0000 On Wed, 3 Feb 2010 16:17, eitanadlerlist@ wrote: > Yeah - I wasn't sure what else to use. > Does the -V work as intended? Is this a worthwhile patch? > > IMHO the biggest problem with unix system commands is the lack of constancy > of the flags. > Personally I would like to see pkill have this option as '-l' since pgrep uses '-l' for long output I think it would make more sense if the user is already used to what they expect to find in pgrep be also available in pkill. Other than that it works as expected. ;) > On Wed, Feb 3, 2010 at 7:58 PM, jhell wrote: > >> >> On Wed, 3 Feb 2010 12:52, jhell@ wrote: >> >>> >>> On Wed, 3 Feb 2010 10:00, eitanadlerlist@ wrote: >>> >>>> I added an option to pkill which lists what processes it kills and what >>>> signal is sent. If no signals are sent it prints out the same message >>>> killall does. >>>> >>>> >>> Unfortunately that patch works but has unintended operation that can be >>> seen with the following. >>> >>> sleep 1000 & >>> pkill sleep >>> No matching processes belonging to you were found >>> [1]+ Terminated: 15 sleep 10000 >>> >>> It then kills sleep and still prints no processes belong to you message. >>> >>> Now pkill -v sleep on my system actually causes my Xserver to exit with a >>> unexpected signal 15. >>> >>> Without the patches it works as it should... >>> >>> Overhead endured. >>> >>> >>> >> Ugh! ignore the pkill -v comment. Should have noticed the -V instead. >> >> >> -- >> >> jhell >> >> > -- jhell