lua-users home
lua-l archive

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


Hi,
I have no experience with this HTTP lib you use here.

But if it is designed for Lua 5.4, it should support __close meta functionality.

In this case, if you define your stream with <close>, like:
local fh<close>, err = assert(io.popen("uname -o 2>/dev/null","r"))

then fh should be closed not by garbage collector "at some undefined
later time", but exactly at the end of your local variable fh (so at
the end of this function).

... maybe if you try this, you get some better idea, what exactly
happens at this crash / leads to this crash.

... just idea... .