Module

Open3

Open3 grants you access to stdin, stdout, and stderr when running another program. Example:

require "open3"
include Open3

stdin, stdout, stderr = popen3('nroff -man')

Open3.popen3 can also take a block which will receive stdin, stdout and stderr as parameters. This ensures stdin, stdout and stderr are closed once the block exits. Example:

require "open3"

Open3.popen3('nroff -man') { |stdin, stdout, stderr| ... }
Public Methods
popen3 Open stdin, stdout, and stderr streams and start external executable. Non-block form:
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.