You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My openresty server is crashing when it attempts to load a file that includes xlua. I've been racking my brain as to the root cause but I'm totally stumped. The offending code is:
For some reason, io.popen both from the lua sys package for uname and the call to io.popen('tput cols', 'r') are returning nil when they are read. My first guess was that something is redirecting stdin and stdout, I can neither prove or disprove this theory as I'm fairly new to Lua. io.popen works fine in the file that I'm requiring xlua from. Any thoughts or debugging ideas would be much appreciated. I totally understand this could have nothing to do with xlua and instead be caused by a different library, I just thought it was especially strange that io.popen only seems to be busted in xlua's init.lua.
The text was updated successfully, but these errors were encountered:
My openresty server is crashing when it attempts to load a file that includes xlua. I've been racking my brain as to the root cause but I'm totally stumped. The offending code is:
https://github.com/torch/xlua/blob/master/init.lua#L224-L231
For some reason,
io.popen
both from the lua sys package foruname
and the call toio.popen('tput cols', 'r')
are returning nil when they are read. My first guess was that something is redirectingstdin
andstdout
, I can neither prove or disprove this theory as I'm fairly new to Lua.io.popen
works fine in the file that I'm requiring xlua from. Any thoughts or debugging ideas would be much appreciated. I totally understand this could have nothing to do with xlua and instead be caused by a different library, I just thought it was especially strange thatio.popen
only seems to be busted in xlua'sinit.lua
.The text was updated successfully, but these errors were encountered: