Skip to content

Commit

Permalink
Limit fix for #2505 to just Windows.
Browse files Browse the repository at this point in the history
It is not clear whether popen should automatically choose sh when
under *nix, and this causes test_pid in MRI test_io to fail with
an off-by-one pid (because the sh process and the target command
are different pids).
  • Loading branch information
headius committed Feb 27, 2015
1 parent 79f0889 commit 3a1d136
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/util/ShellLauncher.java
Expand Up @@ -749,7 +749,7 @@ private static Process popenShared(Ruby runtime, IRubyObject[] strings, Map env,

String[] args = parseCommandLine(runtime.getCurrentContext(), runtime, strings);
LaunchConfig lc = new LaunchConfig(runtime, strings, false);
boolean useShell = lc.shouldRunInShell();
boolean useShell = Platform.IS_WINDOWS ? lc.shouldRunInShell() : false;
if (addShell) for (String arg : args) useShell |= shouldUseShell(arg);

// CON: popen is a case where I think we should just always shell out.
Expand Down

0 comments on commit 3a1d136

Please sign in to comment.