mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* process.c (run_exec_pgroup): C99 ism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
10ffed17c9
commit
a5c9928320
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Jun 3 13:35:40 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* process.c (run_exec_pgroup): C99 ism.
|
||||||
|
|
||||||
Tue Jun 3 12:51:57 2008 Akinori MUSHA <knu@iDaemons.org>
|
Tue Jun 3 12:51:57 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* enumerator.c (enumerator_allocate, enumerator_ptr): Properly
|
* enumerator.c (enumerator_allocate, enumerator_ptr): Properly
|
||||||
|
|
|
@ -2015,11 +2015,12 @@ run_exec_pgroup(VALUE obj, VALUE save)
|
||||||
* No race condition, even without setpgid from the parent.
|
* No race condition, even without setpgid from the parent.
|
||||||
* (Is there an environment which has setpgid but FD_CLOEXEC?)
|
* (Is there an environment which has setpgid but FD_CLOEXEC?)
|
||||||
*/
|
*/
|
||||||
|
pid_t pgroup;
|
||||||
if (!NIL_P(save)) {
|
if (!NIL_P(save)) {
|
||||||
/* maybe meaningless with no fork environment... */
|
/* maybe meaningless with no fork environment... */
|
||||||
rb_ary_store(save, EXEC_OPTION_PGROUP, PIDT2NUM(getpgrp()));
|
rb_ary_store(save, EXEC_OPTION_PGROUP, PIDT2NUM(getpgrp()));
|
||||||
}
|
}
|
||||||
pid_t pgroup = NUM2PIDT(obj);
|
pgroup = NUM2PIDT(obj);
|
||||||
if (pgroup == 0) {
|
if (pgroup == 0) {
|
||||||
pgroup = getpid();
|
pgroup = getpid();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue