Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.6.5
-
Fix Version/s: None
-
Component/s: Core Classes/Modules, Ruby 1.9.2
-
Labels:None
-
Number of attachments :
Description
Process.spawn ignores the :chdir option:
jruby-1.6.5 :028 > Process.spawn("pwd", :chdir => '/tmp')
/Users/ddeleo/code/tevatron
=> 28210
ruby-1.9.3-p0 :001 > Process.spawn("pwd", :chdir => '/tmp')
=> 28244
ruby-1.9.3-p0 :002 > /private/tmp
If I'm following the code correctly, these methods get delegated to runExternal in ShellLauncher which hard-codes the directory to the current working directory:
File pwd = new File(runtime.getCurrentDirectory());
I'm not sure if this is related to JRUBY-5710 since the description is a bit vague there.
Issue Links
- duplicates
-
JRUBY-5710
[1.9] open3.rb uses spawn in ways we don't support
-
As mentioned in
JRUBY-5710, open3 uses Process#spawn with option hash, which should be processed.