Date: Wed, 10 Apr 2002 04:41:26 -0700 From: David Schultz <dschultz@uclink.Berkeley.EDU> 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> In-Reply-To: <200204101121.g3ABLBK48917@freefall.freebsd.org>; from maxim@FreeBSD.org on Wed, Apr 10, 2002 at 04:21:11AM -0700 References: <200204101121.g3ABLBK48917@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake maxim@FreeBSD.org <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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020410044126.A64711>