lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Petr,

> I am having some trouble with luasocket/lanes on Solaris. The
> following code prints "No such file or directory" instead of the http
> code.
> 
> worker = lanes.gen("*",
>     function(uri)
>         local http = require("socket.http")
>         page, code, headers = http.request {
>             method = "GET",
>             url = uri
>         }
>         print(code)
>         return {code, headers}
>     end
> )
> 
> The server receives the request, I can see it in the log. Without the
> lane I get the http code back. Everything is fine on Linux/Windows.

Coming from Linux my first instinct would be to run your script under
strace [1] to see where the error code occurs. I'm not sure if strace is
available on Solaris, but if it's not maybe similar tools exist? Looking
at Wikipedia it mentions Truss and DTrace, maybe give one of those a
try? Good luck!

 - Peter Odding

[1] http://en.wikipedia.org/wiki/strace