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
This commit is contained in:
Xin LI 2012-05-11 21:52:05 +00:00
parent a20f92a206
commit 65c4dcd311
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=235293

View File

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