summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-07-13 04:38:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-07-13 04:38:01 +0000
commit35c6e6af5ba2c405a91dc6b9e4af833d0979ed22 (patch)
tree7f54dda0bcda0a58eb5229def03ce3015c98a2b5 /process.c
parent71d408a6c3298b229c0f1d2ff7159ca410a4c612 (diff)
str2cstr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/process.c b/process.c
index faa5e9dd67..9d01abe0a8 100644
--- a/process.c
+++ b/process.c
@@ -787,7 +787,7 @@ proc_getpgrp(argc, argv)
int pid;
rb_scan_args(argc, argv, "01", &vpid);
- pid = NUM2INT(vpid);
+ pid = NIL_P(vpid)?0:NUM2INT(vpid);
pgrp = BSD_GETPGRP(pid);
#else
rb_scan_args(argc, argv, "0");
@@ -809,8 +809,8 @@ proc_setpgrp(argc, argv)
rb_scan_args(argc, argv, "02", &pid, &pgrp);
- ipid = NUM2INT(pid);
- ipgrp = NUM2INT(pgrp);
+ ipid = NIL_P(pid)?0:NUM2INT(pid);
+ ipgrp = NIL_P(pgrp)?0:NUM2INT(pgrp);
if (BSD_SETPGRP(ipid, ipgrp) < 0) rb_sys_fail(0);
#else
rb_scan_args(argc, argv, "0");