Project

General

Profile

Actions

Bug #907

closed

Various system() and backticks problems on Windows

Added by quix (James M. Lawrence) over 15 years ago. Updated about 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-core:20695]

Description

=begin

  • system("x/y.bat") fails because it is interpreted as option /y being
    passed to command x.

  • system("y") fails when y.bat is in the current directory and "." is
    in PATH. "y" succeeds in the console shell window. Similar problems
    occur when passing relative or absolute paths.

  • system("c:/x/z", "1") fails to spawn c:/x/z.exe.

  • Variables are not expanded:
    system(%{ruby -e "p '%PATH%'"}) #=> "%PATH%"

  • Non-existent file in backticks noexist raises Errno::ENOENT.
    On Linux no exception is raised.

Proposed spec:

Current failures on the spec:

A prototype patch which fits the spec:

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0