Date: Fri, 11 May 2012 21:52:05 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r235293 - head/usr.sbin/rtprio Message-ID: <201205112152.q4BLq5OT002050@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <bugsbeastie gmail.com> 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]); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205112152.q4BLq5OT002050>