Need help in circumventing a 'Select' problem
Vox Populi
ravim at gtenmc.UUCP
Sat Mar 16 03:21:36 AEST 1991
I'm having a problem with 'select' call, that returns an error (I/O error,
in particular), apparently when one of the ports (fd's) goes down for some
inexplicable reason.
This happens once in a while in one of our application modules that executes
'select' call on a few opened ports (these ports could be 'vt' ports, or dumb
ports - connected to modems, or even regular disk files). In normal
conditions, when 'select' call returns successfully, the process goes on
to check which fd's are set and then performs 'read' on the set ports.
But right now, our application does not handle error conditions on 'select'
properly.
What I would like to know is what is the best way to find out the offending
port (that causes 'select' to return error, if I am right) so that I can
close this port and perform 'select' on the rest of fd's. However, one
limitation is performing 'read' on all the ports in the list to see which
port returns error is not advised, as this may disturb the ports (connected
to modems) that are still in the process of setting up.
Any solutions are welcome (as long as they do not cause data pending on the
working ports to be lost).
The system I am using is DEC's VAX 6420 with UNIX System V 3.1c 2.36+.
And the ports are all opened in O_RDWR mode with O_NDELAY option.
Thanks in advance.
Please e-mail me as I may not be able to read all the responses on the net.
- Ravi Mandava
(e-mail ravim at gtenmc.UUCP)
P.S.: I'll post a summary of the solutions offered later.
--
********************** #include <stddisclaimer.h> **************************
Ravi Mandava e-mail : ravim at gtenmc.gtetele.com
or ravim at gtenmc.UUCP
*******************************************************************************
More information about the Comp.unix.questions
mailing list