lua-users home
lua-l archive

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


> Not probably - File descriptors are assigned starting with the 
> smallest available.  Closing stdin and immediately opening a new 
> file is guaranteed to use file descriptor 0.

You're right. My point was that some implementations, including Mac OS X,
not only recycle file descriptors in the UNix tradition, but also recycle
FILE* and so the newly opened file will "be" stdin!

This is from /usr/include/stdio.h in Mac OS X 10.4:
	#define stdin   (&__sF[0])

--lhf