mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* process.c (rb_exec_arg_addopt, rb_exec_arg_addopt): now can specify
close_exec on having no fork environment (but still meaningless). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1414a7a8e2
commit
6837681a4c
2 changed files with 5 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Apr 28 12:48:57 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* process.c (rb_exec_arg_addopt, rb_exec_arg_addopt): now can specify
|
||||
close_exec on having no fork environment (but still meaningless).
|
||||
|
||||
Mon Apr 28 11:11:29 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* process.c (run_exec_options): don't call FIX2INT for nil.
|
||||
|
|
|
@ -1434,7 +1434,6 @@ rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val)
|
|||
}
|
||||
rb_ary_store(options, EXEC_OPTION_UMASK, LONG2NUM(cmask));
|
||||
}
|
||||
#ifdef HAVE_FORK
|
||||
else if (id == rb_intern("close_others")) {
|
||||
if (!NIL_P(rb_ary_entry(options, EXEC_OPTION_CLOSE_OTHERS))) {
|
||||
rb_raise(rb_eArgError, "close_others option specified twice");
|
||||
|
@ -1442,7 +1441,6 @@ rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val)
|
|||
val = RTEST(val) ? Qtrue : Qfalse;
|
||||
rb_ary_store(options, EXEC_OPTION_CLOSE_OTHERS, val);
|
||||
}
|
||||
#endif
|
||||
else if (id == rb_intern("in")) {
|
||||
key = INT2FIX(0);
|
||||
goto redirect;
|
||||
|
@ -1512,11 +1510,9 @@ check_exec_fds(VALUE options)
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_FORK
|
||||
if (RTEST(rb_ary_entry(options, EXEC_OPTION_CLOSE_OTHERS))) {
|
||||
rb_ary_store(options, EXEC_OPTION_CLOSE_OTHERS, INT2FIX(maxhint));
|
||||
}
|
||||
#endif
|
||||
return h;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue