def loop()
raise RFuse::Error, "Already running!" if @running
raise RFuse::Error, "FUSE not mounted" unless mounted?
@running = true
while @running do
begin
ready, ignore, errors = IO.select([@fuse_io,@pr],[],[@fuse_io])
if ready.include?(@pr)
signo = @pr.read_nonblock(1).unpack("c")[0]
if (signame = Signal.list.invert[signo])
call_sigmethod(sigmethod(signame))
end
elsif errors.include?(@fuse_io)
@running = false
raise RFuse::Error, "FUSE error"
elsif ready.include?(@fuse_io)
if process() < 0
@running = false
end
end
rescue Errno::EWOULDBLOCK, Errno::EAGAIN
end
end
end