summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-17 08:29:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-17 08:29:09 +0000
commitbc5ff99474cc1ca67c14471b8c95244542740ef8 (patch)
tree84917adb6e715184675c69737df07cdbdaeb0814 /process.c
parente9bdbbdb755ee451302c3d834ad20f77d80754f0 (diff)
2000-02-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/process.c b/process.c
index e569ef5f6e..1d345fafa5 100644
--- a/process.c
+++ b/process.c
@@ -195,10 +195,11 @@ rb_f_waitpid(obj, vpid, vflags)
int pid, flags, status;
if (NIL_P(vflags)) flags = 0;
- else flags = FIX2UINT(vflags);
+ else flags = NUM2UINT(vflags);
- if ((pid = rb_waitpid(FIX2UINT(vpid), flags, &status)) < 0)
+ if ((pid = rb_waitpid(NUM2INT(vpid), flags, &status)) < 0)
rb_sys_fail(0);
+ if (pid == 0) return Qnil;
return INT2FIX(pid);
}