svn commit: r235293 - head/usr.sbin/rtprio

Xin LI delphij at FreeBSD.org
Fri May 11 21:52:06 UTC 2012


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]);
 		}


More information about the svn-src-all mailing list