Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange popen behavior when xlua included in OpenResty #21

Open
vanpelt opened this issue Sep 11, 2016 · 1 comment
Open

Strange popen behavior when xlua included in OpenResty #21

vanpelt opened this issue Sep 11, 2016 · 1 comment

Comments

@vanpelt
Copy link

vanpelt commented Sep 11, 2016

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 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.

@ivodopyanov
Copy link

I'm having same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants