On Thu, Jan 6, 2011 at 1:10 PM, Alexander Best <arun...@freebsd.org> wrote: > On Thu Jan 6 11, Garrett Cooper wrote: >> On Thu, Jan 6, 2011 at 12:41 PM, Alexander Best <arun...@freebsd.org> wrote: >> >> ... >> >> > this causes problems when pid is -0: >> > >> > [id|rt]prio -t -0 and [id|rt]prio 10 -0 will try to run "0" via execvp(). >> > beforehand however this will also trigger rtprio(). >> > >> > a better solution would be to do: >> > >> > if (argv[2][0] == '-') { >> > proc = parseint(argv[2] + 1, "pid"); >> > if (rtprio(RTP_SET, proc, &rtp) != 0) >> > err(1, "RTP_SET"); >> > } else { >> > execvp(argv[2], &argv[2]); >> > err(1, "%s", argv[2]); >> > } >> >> How did you get a pid of -0? > > pid 0 stands for the current process. see rptio(2).
Man, that's awesome syntax >.<. -Garrett _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"