[ruby-core:74734] [Ruby trunk Bug#12234] Kernel#exec with a command array broken on Windows as of Ruby 2.2.4

From: nobu@...
Date: 2016-03-31 06:36:10 UTC
List: ruby-core #74734
Issue #12234 has been updated by Nobuyoshi Nakada.

Description updated
Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED

----------------------------------------
Bug #12234: Kernel#exec with a command array broken on Windows as of Ruby 2.2.4
https://bugs.ruby-lang.org/issues/12234#change-57869

* Author: Vais Salikhov
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]
* Backport: 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED
----------------------------------------
On Ruby 2.0.0 this worked as expected:

```
C:\Users\Administrator\GitHub\spec>ruby -ve "exec(['cmd.exe', '/C'], 'echo', 'argv_zero')"
ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
argv_zero
```
On Ruby 2.2.4 it is broken - it seems to be getting stuck somehow in the new shell and never returns:

```
C:\Users\Administrator>c:\Ruby\ruby-2.2.4-i386-mingw32\bin\ruby.exe -ve "exec(['cmd.exe', '/C'], 'echo', 'argv_zero')"
ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Administrator>
```



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next