From owner-svn-src-head@FreeBSD.ORG Fri May 11 21:52:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A8131065673; Fri, 11 May 2012 21:52:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0604E8FC18; Fri, 11 May 2012 21:52:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BLq5BM002052; Fri, 11 May 2012 21:52:05 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BLq5OT002050; Fri, 11 May 2012 21:52:05 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205112152.q4BLq5OT002050@svn.freebsd.org> From: Xin LI Date: Fri, 11 May 2012 21:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235293 - head/usr.sbin/rtprio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 21:52:06 -0000 Author: delphij Date: Fri May 11 21:52:05 2012 New Revision: 235293 URL: http://svn.freebsd.org/changeset/base/235293 Log: Fix the case where the utility is being used to run a command directly, this is a regression introduced with r228917. PR: bin/154042 Submitted by: Bugs Beastie MFC after: 1 week Modified: head/usr.sbin/rtprio/rtprio.c Modified: head/usr.sbin/rtprio/rtprio.c ============================================================================== --- head/usr.sbin/rtprio/rtprio.c Fri May 11 21:25:59 2012 (r235292) +++ head/usr.sbin/rtprio/rtprio.c Fri May 11 21:52:05 2012 (r235293) @@ -109,9 +109,12 @@ main(int argc, char *argv[]) if (argv[2][0] == '-') { proc = parseint(argv[2], "pid"); proc = abs(proc); - if (rtprio(RTP_SET, proc, &rtp) != 0) - err(1, "RTP_SET"); - } else { + } + + if (rtprio(RTP_SET, proc, &rtp) != 0) + err(1, "RTP_SET"); + + if (proc == 0) { execvp(argv[2], &argv[2]); err(1, "execvp: %s", argv[2]); }