summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-03 04:36:28 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-03 04:36:28 +0000
commita5c99283201bb66f61c216955dbfbffe683598e5 (patch)
tree176a68bf5b49f5b0771fb4fa758f4a07a335b583 /process.c
parent10ffed17c992558fe51a146612df415a2b390714 (diff)
* process.c (run_exec_pgroup): C99 ism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 682ba259bc..ae877c1147 100644
--- a/process.c
+++ b/process.c
@@ -2015,11 +2015,12 @@ run_exec_pgroup(VALUE obj, VALUE save)
* No race condition, even without setpgid from the parent.
* (Is there an environment which has setpgid but FD_CLOEXEC?)
*/
+ pid_t pgroup;
if (!NIL_P(save)) {
/* maybe meaningless with no fork environment... */
rb_ary_store(save, EXEC_OPTION_PGROUP, PIDT2NUM(getpgrp()));
}
- pid_t pgroup = NUM2PIDT(obj);
+ pgroup = NUM2PIDT(obj);
if (pgroup == 0) {
pgroup = getpid();
}