Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.4.0RC3
-
Fix Version/s: JRuby 1.5
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Latest JRuby 1.1RC2, rev 6111, Ubuntu Linux
Description
A bugfix for JRUBY-1557, revision 6111, introduced a minor regression on Kernel#system behavior:
system('non-existing-file')
returns false on MRI and no output, while it returns false on JRuby, but with additional output:
/bin/sh: non-existing-file: not found
This is visible when running the rubyspecs, with dotted formatter, and not only dots are printed, but something like that:
..../bin/sh: sad: not found
..................
Issue Links
- is related to
-
JRUBY-1557
Using backquotes to run commands with shell redirects sometimes passes the redirects to the called program
-
This is because MRI looks up the executable on the PATH before attempting to run it, whereas jruby passes the argument array directly to the shell for execution, without first verifying whether a matching executable can be found on the PATH.
This can be fixed at the same time as
JRUBY-2253by making it so that jruby also searches the PATH before executing, raising Error::ENOENT if no matching executable is found.JRUBY-2253by making it so that jruby also searches the PATH before executing, raising Error::ENOENT if no matching executable is found.