[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Crash after when io.poep is used
- From: bil til <biltil52@...>
- Date: Thu, 2 Feb 2023 10:34:34 +0100
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... .