Fun with file descriptors
Posted Jun 11, 2007 12:29 UTC (Mon) by
nlucas (subscriber, #33793)
In reply to:
Fun with file descriptors by RobSeace
Parent article:
Fun with file descriptors
Fair enough. To me, even the lowest number fd guarantee is strange, so I though it was some POSIX weirdness (along with other weird behaviours for compatibility sake).
Anyway, even the { close(0);open(...); } is strange, as it doesn't take into account multithreading, so I wouldn't ever do anything like that, even in single threaded applications (I never know when a piece of code that seems trivial will be latter "copy/pasted" to a multithreaded application).
(
Log in to post comments)