jettero has asked for the wisdom of the Perl Monks concerning the following question:

really, this would work fine: `renice -n 10 $$`; I'd rather use setpriority $mysterious_argument, $mysterious_argument, 10; The problem is that the perldoc -f for setpriority doesn't make sense to me. I suspect that I want to setpriority PRIO_USER, $$, 10, but I'm not sure what a PRIO_USER is or where to get it.

Replies are listed 'Best First'.
Re: renice
by btrott (Parson) on Jul 19, 2000 at 04:03 UTC
    Did you do
    man setpriority
    You'll want PRIO_PROCESS (which is 0) for the first argument, 0 (which means the current whatever, whatever being the current process, group, or user) for the second, then the priority for the third.

    I suspect there must be some good way of getting at these constants, but I'm not quite sure how.

      Actually I did ... I feel quite foolish. This I confirm'd to have worked: perl -e 'setpriority PRIO_PROCESS, 20498, 10'; where 20498 was the pid of my bash.