* process.c (rb_spawn_internal): need to call run_exec_options() before

spawn if the platform doesn't have fork. [ruby-dev:34647]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2008-05-12 09:17:58 +00:00
Родитель 430cabfad8
Коммит ad72d1d3a2
2 изменённых файлов: 16 добавлений и 8 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Mon May 12 18:16:44 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* process.c (rb_spawn_internal): need to call run_exec_options() before
spawn if the platform doesn't have fork. [ruby-dev:34647]
Mon May 12 15:20:02 2008 Tanaka Akira <akr@fsij.org>
* gc.c (ruby_vm_xmalloc): increase malloc_increase only if malloc

Просмотреть файл

@ -2565,20 +2565,22 @@ rb_spawn_internal(int argc, VALUE *argv, int default_close_others)
#if defined HAVE_FORK
status = rb_fork(&status, rb_exec_atfork, &earg, earg.redirect_fds);
if (prog && earg.argc) earg.argv[0] = prog;
#elif defined HAVE_SPAWNV
#else
if (run_exec_options(&earg) < 0) {
return -1;
}
argc = earg.argc;
argv = earg.argv;
if (prog && argc) argv[0] = prog;
# if defined HAVE_SPAWNV
if (!argc) {
status = proc_spawn(RSTRING_PTR(prog));
}
else {
status = proc_spawn_n(argc, argv, prog);
}
if (prog && argc) argv[0] = prog;
#else
argc = earg.argc;
argv = earg.argv;
if (prog && argc) argv[0] = prog;
# else
if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
status = system(StringValuePtr(prog));
# if defined(__human68k__) || defined(__DJGPP__)
@ -2586,6 +2588,7 @@ rb_spawn_internal(int argc, VALUE *argv, int default_close_others)
# else
rb_last_status_set((status & 0xff) << 8, 0);
# endif
# endif
#endif
return status;
}