in reply to selecting from a number of different input sources.
when initiating the function call to the threaded function, I pass the file descriptors as well,
You shouldn't have to work with file descriptors. Pass the file name to the thread.