How can I spawn a process with a nice priority value?



next up previous contents
Next: What does ``mc Up: Running and debugging Previous: In what directory

How can I spawn a process with a nice priority value?

Sorry, you can't. You'll have to call setpriority() in your code. Or you could replace your program with a shell script, f.e.:

    % cd ~/pvm3/bin/SUN4
    % mv prog prog-
    % echo 'P=$0"-"; shift; exec nice -10 $P $@' > prog
    %  chmod 755 prog

Then when you spawn prog the shell script will exec prog- (the real thing) at a new priority level.



Bob Manchek
Fri Mar 3 15:08:11 EST 1995