From owner-freebsd-bugs Wed Apr 10 4:53:43 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from HAL9000.wox.org (12-232-222-90.client.attbi.com [12.232.222.90]) by hub.freebsd.org (Postfix) with ESMTP id 9451D37B405; Wed, 10 Apr 2002 04:53:34 -0700 (PDT) Received: (from das@localhost) by HAL9000.wox.org (8.11.6/8.11.6) id g3ABfRU64739; Wed, 10 Apr 2002 04:41:27 -0700 (PDT) (envelope-from das) Date: Wed, 10 Apr 2002 04:41:26 -0700 From: David Schultz To: maxim@FreeBSD.org Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/34076: [PATCH] Add -n flag to renice; update docs Message-ID: <20020410044126.A64711@HAL9000.wox.org> References: <200204101121.g3ABLBK48917@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200204101121.g3ABLBK48917@freefall.freebsd.org>; from maxim@FreeBSD.org on Wed, Apr 10, 2002 at 04:21:11AM -0700 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Thus spake maxim@FreeBSD.org : > Synopsis: [PATCH] Add -n flag to renice; update docs > > State-Changed-From-To: open->patched > State-Changed-By: maxim > State-Changed-When: Wed Apr 10 04:18:40 PDT 2002 > State-Changed-Why: > A similar diff were committed to -current. Thanks! I haven't tried it, but I think there are two slight bugs in your version of the patch. The getnum() addition is very nice, though. + if (strcmp(*argv, "-n") == 0) { + incr = 1; + argc--, argv++; + if (argc == 0) + usage(); + } Shouldn't it say `argc < 2' instead of `argc == 0'? At least one process must be specified. Also, I think the bounds check on `prio' needs to be removed from main(). It prevents negative adjustments from working; donice() does the right check. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message