User: Password:
|
|
Subscribe / Log in / New account

More fun with file descriptors

More fun with file descriptors

Posted Jun 14, 2007 16:15 UTC (Thu) by zlynx (subscriber, #2285)
In reply to: More fun with file descriptors by davecb
Parent article: More fun with file descriptors

I believe the context of the whole file descriptor discussion involves threading and the bad performance of high file descriptors.

If your library wants to dup2 a high file descriptor, another library could be trying the same trick in another thread and screw up the whole thing if it happened at just the right point between your fstat and the dup.

The performance problems happen because of the way file descriptors are handled in-kernel.


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds