Це бага, чи я чогось не розумію?
Rpoll не призначене для роботи із піпами?
[isbear:~] cat luatest1.lua
require ( 'posix' )
f = io.open ( 'one' )
c = 10
while c > 0 do
c = c - 1
ret = posix.rpoll ( f, 500 )
lin = f:read ()
print ( ret, lin )
end
-- The End.
[isbear:~] cat luatest2.lua
require ( 'posix' )
f = io.popen ( 'cat one' )
c = 10
while c > 0 do
c = c - 1
ret = posix.rpoll ( f, 500 )
lin = f:read ()
print ( ret, lin )
end
-- The End.
[isbear:~] lua luatest1.lua
1 adsf
1 fasdfea adf
1 fdasfeaf
1 fdaaaffff
1 fdag
1 fdasffffasddf
1
1 nil
1 nil
1 nil
[isbear:~] lua luatest2.lua
nil adsf
nil fasdfea adf
nil fdasfeaf
nil fdaaaffff
nil fdag
nil fdasffffasddf
nil
nil nil
nil nil
nil nil