[MacRuby] #1400: IO.popen with "w" flag creates an object with wrong descriptor.
#1400: IO.popen with "w" flag creates an object with wrong descriptor. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- IO.popen with "w" flag creates an object with wrong descriptor. So, When open the files before closing object which is created by IO.popen, MacRuby can't handle those files correctly. Test Script: {{{ #!ruby #child = IO.popen("echo", "r") child = IO.popen("cat", "w") p child file = open("/tmp/test", "r+") child.close p file.fileno p file.closed? p file.read file.close }}} IO.popen's object and File's object have same descriptor. {{{ $ macruby test_popen.rb #<IO:fd 3> 3 false /Users/watson/tmp/test_popen.rb:10:in `<main>': Bad file descriptor - read() failed (Errno::EBADF) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1400> MacRuby <http://macruby.org/>
#1400: IO.popen with "w" flag creates an object with wrong descriptor. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by watson1978@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Fixed with https://github.com/MacRuby/MacRuby/commit/898ae33725e3595a5336013a30784e1620... -- Ticket URL: <http://www.macruby.org/trac/ticket/1400#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby