Roland Dreier writes: > > > In an attempt to get unexpected DISCONNECT notifications during > > ib communication, I'm trying to use 'select()' on the cm channel's file > > descriptor, testing it for readability. I've found that this works some= > of > > the time, but not all of the time. > > What happens when it doesn't work? select() doesn't give you an event > but when you try to read there actually is an event there?
Yes. > I took a quick look at the ucma kernel code and the implementation of > select() (the kernel uses poll() as the name but it all ends up in the > same code) looks straightforwardly correct -- there's only one place > where events are added to the queue for a file, and that place wakes up > the poll wait queue. But maybe there is a funny bug somehow. > > - R. Thanks for confirming that use of select() should work. I wasn't sure because I couldn't find any reference to select() in the docs or examples. After further investigation, I found that I was neglecting to reinitialize the fd_set structure after each call to select. It's working great now. Thanks, -bryan _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
