APIdock / Ruby
/
method

setpriority

ruby latest stable - Class: Process
setpriority(p1, p2, p3)
public

See Process#getpriority.

Process .setpriority (Process ::PRIO_USER, 0, 19) #=> 0
Process .setpriority (Process ::PRIO_PROCESS, 0, 19) #=> 0
Process .getpriority (Process ::PRIO_USER, 0) #=> 19
Process .getpriority (Process ::PRIO_PROCESS, 0) #=> 19
static VALUE
proc_setpriority(VALUE obj, VALUE which, VALUE who, VALUE prio)
{
 int iwhich, iwho, iprio;
 iwhich = NUM2INT(which);
 iwho = NUM2INT(who);
 iprio = NUM2INT(prio);
 if (setpriority(iwhich, iwho, iprio) < 0)
 rb_sys_fail(0);
 return INT2FIX(0);
}

AltStyle によって変換されたページ (->オリジナル) /