LWN.net Logo

File descriptor handling changes in 2.6.27

File descriptor handling changes in 2.6.27

Posted Aug 5, 2008 19:53 UTC (Tue) by strcmp (guest, #46006)
In reply to: File descriptor handling changes in 2.6.27 by mheily
Parent article: File descriptor handling changes in 2.6.27

as tialaramex said, it is not only std* you want to inherit. you could want to inherit the
endpoints of a pipe, or some network sockets (plural...), but you may want to have the child's
output on the same tty for debugging purposes. as you don't always have control about the
order of fd-s (some gui library might open sockets depending on what the user clicked) you
will have to renumber painfully instead of just passing /dev/fd/1234 on the command line. and
even then your order of fd-s is just an implicit CLOEXEC flag, and as this flag already
existed it was simpler to just close the last holes than to implement a new, but more
primitive and more burdensome solution and still maintain the flag for backwards
compatibility.


(Log in to post comments)

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