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 | 27fbfd88fa796e1a1dbfae9eddbdeb1d30f42825 (patch) | |
tree | f8912a71b884f122c17c34119c8cce81a229fb24 /process.c | |
parent | 141292aa27edbd2650cfdd52ab7f3ec0af7c74df (diff) | |
download | ruby-27fbfd88fa796e1a1dbfae9eddbdeb1d30f42825.tar.gz ruby-27fbfd88fa796e1a1dbfae9eddbdeb1d30f42825.tar.xz ruby-27fbfd88fa796e1a1dbfae9eddbdeb1d30f42825.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@16470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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)); |