--- !ruby/object:RDoc::RI::MethodDescription 
aliases: []

block_params: ""
comment: 
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: Open stdin, stdout, and stderr streams and start external executable. In addition, a thread for waiting the started process is noticed. The thread has a thread variable :pid which is the pid of the started process.
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: "Non-block form:"
- !ruby/struct:RDoc::Markup::Flow::VERB 
  :body: "  stdin, stdout, stderr, wait_thr = Open3.popen3(cmd)\n  pid = wait_thr[:pid]  # pid of the started process.\n  ...\n  stdin.close  # stdin, stdout and stderr should be closed in this form.\n  stdout.close\n  stderr.close\n  exit_status = wait_thr.value  # Process::Status object returned.\n"
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: "Block form:"
- !ruby/struct:RDoc::Markup::Flow::VERB 
  :body: "  Open3.popen3(cmd) { |stdin, stdout, stderr, wait_thr| ... }\n"
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: The parameter <tt>cmd</tt> is passed directly to Kernel#spawn.
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: wait_thr.value waits the termination of the process. The block form also waits the process when it returns.
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: Closing stdin, stdout and stderr does not wait the process.
full_name: Open3::popen3
is_singleton: true
name: popen3
params: (*cmd) {|| ...}
visibility: public
