summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtprio/rtprio.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/rtprio/rtprio.c')
-rw-r--r--usr.sbin/rtprio/rtprio.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/rtprio/rtprio.c b/usr.sbin/rtprio/rtprio.c
index bb72985..a0b67ea 100644
--- a/usr.sbin/rtprio/rtprio.c
+++ b/usr.sbin/rtprio/rtprio.c
@@ -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]);
}
OpenPOWER on IntegriCloud