system() call hangs if command is too long
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.
Updated by usa (Usaku NAKAMURA) over 5 years ago
- Category changed from platform/mingw to platform/windows
- Status changed from Open to Assigned
- Assignee changed from nobu (Nobuyoshi Nakada) to cruby-windows
Thank you for reporting!
We'll fix it.
memo: This is a bug of w32_spawn().