This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fd_sets and std[fd]


can you put stdin/stdout/stderr in an fdset (well, really only
interested in stdin) and then use it in select?

I'm curious because these are pointers to struct and not actual
integers like sockets, but some documentation I read said you could do
this, and shows socket fd's and these structure pointers used
interchangeably, which just confuses me. Every fiber of my programming
being wants to put stdin->_fileno in their instead, as sockets and
filenumbers are supposed to be the same according to the
documentation.

Can someone unconfuse me?

Thanks,
-Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]