(stdopen): Revert to iterating over descriptors, but
authorJim Meyering <jim@meyering.net>
Wed, 24 Aug 2005 15:25:29 +0000 (15:25 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 24 Aug 2005 15:25:29 +0000 (15:25 +0000)
commitf80cc28124928d6f7ae0c535f8f40598e20cefb2
tree61ace69212c25ce0f48c7aed7d557f4b8dae9a9d
parent55fb58f426465e2348150cf373fa6a5a592e8d8e
(stdopen): Revert to iterating over descriptors, but
rather than using fstat, use fcntl with its F_GETFD flag, which
is more efficient.  Unlike the 2-syscall dup-close approach,
this one doesn't apply any unnecessary pressure on the file
descriptor pool -- thus there is one fewer way to fail.
lib/stdopen.c