[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua bug - loadfile gets stdin confused
- From: roberto@... (Roberto Ierusalimschy)
- Date: Wed, 18 Apr 2007 21:18:31 -0300
> IIRC, the reason the original poster was closing stdin not for daemonization,
> but because on windows, keeping a file open can interfere with other processes
> ability to read/write the file. So not allowing std* to be closed solves one
> problem, but creates another.
Yes, but the problems are different. The first one is a bug, the second
one is a restriction. A buggy implementation is not a good solution to
any problem.
> I'd like to make the case that support for the ANSI C freopen() is what's
> needed here.
We may add freopen (actually, as an ANSI C facility, it deserves to be
in iolib), but we still must correct the problem of accessing a closed
stdin (even after a reopen).
-- Roberto