Actions
Bug #11437
closedIO.pipe problem on windows console
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
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
Like0
Like0