lua-users home
lua-l archive

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


On Wed, Jul 19, 2017 at 9:29 PM, Luiz Henrique de Figueiredo wrote:
> It's fixed now.

Except that now the program below has the problem again:
        a=setmetatable({}, {__gc = function() print("Hello") end})

Fixing this might require surgery in the CGI script.


My suggestion for "CGI surgery":
https://gist.github.com/Egor-Skriptunoff/252060d0ddb744fe26791c7cd26f8bf1

The idea is to defer closing "Output" TEXTAREA by temporarily redirecting its text to file descriptor #3