fd_sets and std[fd]

Jim Stapleton stapleton.41@gmail.com
Thu Feb 23 17:41:00 GMT 2006


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



More information about the Gcc-help mailing list