diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-19 04:26:43 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-19 04:26:43 +0000 |
commit | 888c93593003282257849e7af84b73e1ac0f0d8b (patch) | |
tree | f8912a71b884f122c17c34119c8cce81a229fb24 | |
parent | 385f0e8af657b1334e477e6837b0846cc14fa00d (diff) | |
download | ruby-888c93593003282257849e7af84b73e1ac0f0d8b.tar.gz |
* process.c (rb_spawn_internal): set last_status when status == -1
because there is no path to set it on win32. this patch is derived
from [ruby-core:16787], submitted by Luis Lavena <luislavena at
gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | process.c | 4 |
2 files changed, 11 insertions, 0 deletions
@@ -1,3 +1,10 @@ +Mon May 19 13:23:03 2008 NAKAMURA Usaku <usa@ruby-lang.org> + + * process.c (rb_spawn_internal): set last_status when status == -1 + because there is no path to set it on win32. this patch is derived + from [ruby-core:16787], submitted by Luis Lavena <luislavena at + gmail.com> + Mon May 19 11:32:47 2008 Koichi Sasada <ko1@atdot.net> * vm.c, insns.def, eval.c, vm_insnhelper.c: fix CREF handling. @@ -2674,6 +2674,10 @@ rb_spawn_internal(int argc, VALUE *argv, int default_close_others) else { status = proc_spawn_n(argc, argv, prog); } +# if defined(_WIN32) + if (status == -1) + rb_last_status_set(0x7f << 8, 0); +# endif # else if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" ")); status = system(StringValuePtr(prog)); |