J
Junkone
how do i open the file for reading as non blocking mode. as you can
see the first 2 attempts do not work.
irb(main):058:0> File.open(fi,File::NONBLOCK + File::RDONLY){|f|
c=f.read}
IOError: not opened for reading
from (irb):58:in `read'
from (irb):58
from (irb):58:in `open'
from (irb):58
from ¢¾:0
irb(main):059:0> File.open(fi,File::NONBLOCK ){|f| c=f.read}
IOError: not opened for reading
from (irb):59:in `read'
from (irb):59
from (irb):59:in `open'
from (irb):59
from ¢¾:0
irb(main):060:0> File.open(fi,"r" ){|f| c=f.read}
=> "test"
irb(main):061:0>
see the first 2 attempts do not work.
irb(main):058:0> File.open(fi,File::NONBLOCK + File::RDONLY){|f|
c=f.read}
IOError: not opened for reading
from (irb):58:in `read'
from (irb):58
from (irb):58:in `open'
from (irb):58
from ¢¾:0
irb(main):059:0> File.open(fi,File::NONBLOCK ){|f| c=f.read}
IOError: not opened for reading
from (irb):59:in `read'
from (irb):59
from (irb):59:in `open'
from (irb):59
from ¢¾:0
irb(main):060:0> File.open(fi,"r" ){|f| c=f.read}
=> "test"
irb(main):061:0>