Stderr 'rewind' error on Windows #2

shreyasbharath opened this Issue Jan 21, 2013 · 1 comment


None yet
2 participants

If I run the below command on Windows (Ruby 1.9.3-p362) -

status = POpen4::popen4("dir") do |stdout, stderr, stdin, pid|
  puts "pid        : #{ pid }"
  puts "stdout   : #{ }"
  puts "stderr    : #{ }"

I get the below error -

ruby build\SubProcess.rb
pid : 6884
stdout : Volume in drive C has no label.
Volume Serial Number is FEB9-0047

Directory of C:\
stderr     : File Not Found
C:/Ruby193/lib/ruby/gems/1.9.1/gems/POpen4-0.1.4/lib/popen4.rb:60:in `rewind': Invalid argument (Errno::EINVAL)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/POpen4-0.1.4/lib/popen4.rb:60:in `block in popen4'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/win32-open3-19-0.0.2/lib/win32/open3.rb:6:in `call'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/win32-open3-19-0.0.2/lib/win32/open3.rb:6:in `block in popen4'
        from C:/Ruby193/lib/ruby/1.9.1/open3.rb:208:in `popen_run'
        from C:/Ruby193/lib/ruby/1.9.1/open3.rb:90:in `popen3'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/win32-open3-19-0.0.2/lib/win32/open3.rb:5:in `popen4'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/POpen4-0.1.4/lib/popen4.rb:48:in `popen4'
        from build/SubProcess.rb:66:in `<main>'

shairontoledo commented Jan 29, 2013

Use absolute path to the command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment