STREAMS/UX for the HP 9000 Reference Manual
163
Debugging STREAMS/UX Modules and Drivers
STREAMS/UX Debugging Tool
} /* while */
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].revents = POLLIN|POLLRDBAND;
.
.
.
}
/* Loop polling to see which STREAMS are readable and reading from them
*/
while (1) {
if (poll(upper_fd, stream_count, -1) <= 0) {
err_handler(“Poll returned error %d.\n”,errno);
}
for (i=0; i < stream_count; i++) {
if (upper_fd[i].revents) {
do_a_get(&(str_ctl[i]), &(upper_fd[i]));
} /* if */
} /* for */
} /* while */
The user runs the test, but it does not print any messages. The user runs
strdb to find the problem.
strdb
No current structure S:0
The user types :S to enter STREAMS/UX subsystem mode.
:S
STREAMS subsystem help commands..
? - show this help menu
d - print status of STREAMS daemon
h - show this help menu
la 'name' - list all active STREAMS on device 'name'
ll 'name' 'minor' - list all drivers linked under the STREAMS
driver 'name' and minor number 'minor'
lm 'name' 'minor' - list all modules pushed on STREAMS device
'name' and whose minor number is 'minor'
lp 'name' 'minor' - list all drivers persistently linked under
the STREAMS device 'name' and minor number
'minor'
q - quit the STREAMS subsystem commands
qc 'driver' 'file' - print 'driver' read / write side qcount to
file
qh 'name' 'minor' - display STREAM head queue structure
for device 'name' and minor number 'minor'