[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.1.3-rc4 now available
- From: Mike Pall <mikelu-0801@...>
- Date: Sun, 20 Jan 2008 20:34:19 +0100
I just went through the original bug reports for Lua 5.1.2 and
this one from David Manura caught my attention:
http://lua-users.org/lists/lua-l/2007-04/msg00386.html
Ok, so stdin/stdout/stderr can no longer be closed from Lua code.
This is probably a good idea, anyway. Alas, this makes it hard to
reproduce the problem, but doesn't cure the bug itself.
E.g. stdin may have been closed from C code or may not be open to
begin with (for daemon processes, though it's customary to
freopen() to /dev/null to avoid these kind of problems).
The next opened FILE * may then use the stdin slot. E.g. MSVCRT
suffers from this problem, glibc doesn't, don't know for others.
In this case loadfile() may refuse to load binary chunks and/or
never close the file descriptor.
One possible fix has been posted by Mark Edgar:
http://lua-users.org/lists/lua-l/2007-04/msg00400.html
--Mike