summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/process.c b/process.c
index 9a19d01..1fd43e3 100644
--- a/process.c
+++ b/process.c
@@ -891,8 +891,9 @@ proc_getpriority(obj, which, who)
iwhich = NUM2INT(which);
iwho = NUM2INT(who);
+ errno = 0;
prio = getpriority(iwhich, iwho);
- if (prio < 0) rb_sys_fail(0);
+ if (errno) rb_sys_fail(0);
return INT2FIX(prio);
#else
rb_notimplement();