Thread Tools Search this Thread
Top Forums Programming fd_set
# 1  
Old 03-06-2002
Question fd_set

we can use FD_SET to set the file descriptors
in fd_set. Using, FD_ISSET we can check whether
they are set or not...

Is there any way can we print the values of fd_set
structure..if so please tell me huv to do it..

since by using FD_SET we will be marking fd_set
structure..can we print what we are setting

any pointers can help
# 2  
Old 03-06-2002
Loop from 0 to FD_SETSIZE testing each bit with FD_ISSET. If it is set, print out a message. That will tell you which fd's are in the structure. Isn't that good enough? A portable program should not depending on the internal layout of the structure.
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Programming

Errors with select(), FD_SET, FD_ZERO

I am trying to use select() in a serial port application. I am using select() to signal when there is data available on the port. This seems simple enough to me but I am getting a basic error. When I call FD_ZERO or FD_SET I get an error message: errno 29: Illegal Seek Code: fd_set... (0 Replies)
Discussion started by: rov1
0 Replies
Login or Register to Ask a Question