Giter Club home page Giter Club logo

shairontoledo / popen4 Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 0.0 118 KB

POpen4 provides the Rubyist a single API across platforms for executing a command in a child process with handles on stdout, stderr, stdin streams as well as access to the process ID and exit status. It does very little other than to provide an easy way to use either. Source by John-Mason P. Shackelford

Home Page: http://popen4.rubyforge.org

License: Other

Ruby 47.94% C 52.06%

popen4's People

Contributors

jpshackelford avatar shairontoledo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

popen4's Issues

LoadError win32/open3

I get the below error when I try to require popen4 on Windows with Ruby v1.9.3-p362.

Why isn't win32-open3 a dependency of popen4?

C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- win32/open3 (LoadError)

Stderr 'rewind' error on Windows

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   : #{ stdout.read.strip }"
  puts "stderr    : #{ stderr.read.strip }"
end

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>'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.