STREAMS/UX for the HP 9000 Reference Manual

165
Debugging STREAMS/UX Modules and Drivers
STREAMS/UX Debugging Tool
The user goes back to the code for the get process to see if poll() is being
called incorrectly. The user checks the parameters passed to poll(). The user
sees that the initialization code set revents instead of events before calling
poll(). poll() returns 0 in the revents field because no events were requested.
The corrected code fragment is shown below.
Get Process
/* Initialize the stream and poll structures */
for (i=0; i<stream_count; i++) {
upper_fd[i].fd = i + OPEN_FILES;
upper_fd[i].events = POLLIN|POLLRDBAND; /* Changed revents to events
*/
.
.
.
}