[#68478] Looking for MRI projects for Ruby Google Summer of Code 2015 — Tony Arcieri <bascule@...>

Hi ruby-core,

10 messages 2015/03/10

[ruby-core:68548] [Ruby trunk - Bug #10563] system() call hangs if command is too long

From: nagachika00@...
Date: 2015-03-17 17:43:15 UTC
List: ruby-core #68548
Issue #10563 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: DONTNEED, 2.1: REQUIRED to 2.0.0: DONTNEED, 2.1: DONE

Backported into `ruby_2_1` branch at r49997.

----------------------------------------
Bug #10563: system() call hangs if command is too long
https://bugs.ruby-lang.org/issues/10563#change-51870

* Author: Lars Benner
* Status: Closed
* Priority: Normal
* Assignee: cruby-windows
* ruby -v: ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
* Backport: 2.0.0: DONTNEED, 2.1: DONE
----------------------------------------
In some situations another process, which was started using Kernel::system(), hangs right from the beginning, i.e. the process was started but nothing is actually executed.

On my system this happened, when the single command string passed to system call exceeded 1022 characters.

A very interesting fact is, that this only happens, if the command at the beginning is given with '/' in the path. After I replaced the '/' with '\', everything is working fine.

Please find attached two scripts for reproducing this issue. Just call 'ruby caller.rb' and observe that everything hangs after the command line got to long. After changing the Ruby interpreter in the file. everything works as expected. 






---Files--------------------------------
caller.rb (797 Bytes)
callee.rb (283 Bytes)


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

In This Thread

Prev Next