Project

General

Profile

Actions

Bug #11437

closed

IO.pipe problem on windows console

Added by windwiny (wind winy) over 9 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

# this code copy from Open3.popen3 
def mm(cmd)
  opts = {}

  in_r, in_w = IO.pipe
  opts[:in] = in_r
  in_w.sync = true

  out_r, out_w = IO.pipe
  opts[:out] = out_w


  pid = spawn(cmd, opts)
  wait_thr = Process.detach(pid)
  in_r.close
  out_w.close
  result = [in_w, out_r, wait_thr]

  result
end

mm('dir')

use ruby 2.0 or 2.2 (32bit windows) run this method in irb or pry,
return newline and input some chars, press backspace key can delete a char, but screen still show it

Actions #1

Updated by jeremyevans0 (Jeremy Evans) over 5 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0