Project

General

Profile

Actions

Feature #1482

closed

Kernel.exec doesn't respect COMSPEC environment variable on Windows

Added by dolzenko (Evgeniy Dolzhenko) almost 15 years ago. Updated over 6 years ago.

Status:
Rejected
Target version:
[ruby-core:23491]

Description

Here is pretty convoluted test case:

puts ENV["COMSPEC"] # => "C:\WINDOWS\system32\mycmd.exe"

File.open("1.bat", "w") { |f| f.write("time") } # create test batch file with command which waits for user input
 
Kernel.exec("1.bat") # now the process tree inspection shows that the "C:\WINDOWS\system32\cmd.exe" is still used to interpret 1.bat

Files

0001-win32.c-use-COMSPEC.patch (2.03 KB) 0001-win32.c-use-COMSPEC.patch nobu (Nobuyoshi Nakada), 10/29/2012 05:39 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0