Created
November 4, 2015 20:15
-
-
Save cbrake/612c9d6269283795b54d to your computer and use it in GitHub Desktop.
libubox Interrupted system call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env lua | |
-- the following will eventually fail on lua5.1 and luajit | |
-- with: | |
-- lua: test-uloop.lua:30: Interrupted system call | |
uloop = require 'uloop' | |
uloop.init() | |
local t | |
function t__() | |
t:set(1) | |
end | |
t = uloop.timer(t__, 1) | |
uloop.timer(function() | |
while true do | |
print('popen test') | |
local i = io.popen('ifconfig', 'r') | |
for line in i:lines() do | |
print(line) | |
end | |
end | |
end, 1) | |
uloop.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm seeing this too, but this seems to be more of a popen/read problem than a uloop problem: the read() in lines() receives 2 SIGCHLDs as 'ifconfig' and its parent shell complete and fails to restart the read.