Skip to content

sys.execute() causes exception in OpenResty  #12

@vanpelt

Description

@vanpelt

For some reason: https://github.com/torch/sys/blob/master/init.lua#L37-L40 is returning nil when launched through OpenResty which causes an exception.

app.lua

local sys = require 'sys'

Running resty app.lua results in:

$ resty app.lua 
/Users/vanpelt/torch/install/share/lua/5.1/sys/init.lua:40: attempt to index local 's' (a nil value)

(sys.execute is being called to set sys.prefix)

I have no clue why popen is behaving strangely, but thought the nil output case should be handled. Any idea's why child processes are failing in this context?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions