From owner-freebsd-bugs@FreeBSD.ORG Sat Nov 7 15:30:04 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28039106568B for ; Sat, 7 Nov 2009 15:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F07438FC1D for ; Sat, 7 Nov 2009 15:30:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7FU3OD049443 for ; Sat, 7 Nov 2009 15:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nA7FU3rm049422; Sat, 7 Nov 2009 15:30:03 GMT (envelope-from gnats) Date: Sat, 7 Nov 2009 15:30:03 GMT Message-Id: <200911071530.nA7FU3rm049422@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Jilles Tjoelker Cc: Subject: Re: bin/40282: [patch] kill(1) has bad error checking for command line parameters X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jilles Tjoelker List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2009 15:30:04 -0000 The following reply was made to PR bin/40282; it has been noted by GNATS. From: Jilles Tjoelker To: bug-followup@FreeBSD.org, oleg@reis.zp.ua Cc: Subject: Re: bin/40282: [patch] kill(1) has bad error checking for command line parameters Date: Sat, 7 Nov 2009 16:21:46 +0100 I think the idea of aborting on syntax errors makes sense, but aborting on a kill(2) error seems to go too far. I have found various shells (tcsh, real ksh) that stop processing a kill builtin if they encounter an invalid pid (if there were any previous valid pids, signals will have been sent), but have not found any that stop processing if a kill(2) returns an error. By the way, do not imply anything about command behaviour from /usr/bin/which. sh(1) and bash(1) do not have a which(1) builtin, so /usr/bin/which will be used, which does not know about shell builtins. It just happens to be the case that sh(1) does not have a kill builtin (although that may change in the future) and bash's kill builtin handles errors the same way as our /bin/kill. You can use 'type' for accurate information in these shells. -- Jilles Tjoelker