Sockets and interrupt driven I/O

Sean Holdsworth HoldswoS at r4.cs.man.ac.uk
Mon Feb 26 23:24:22 AEST 1990


I am currently struggling with sockets under SUNOS 3.5. The basic problem is
trying to implement interrupt driven I/O rather than use the select call
which I can't use because of other activity within the same process.

The current state of play is that I've succeeded in arranging to have the
arrival of data at a socket signalled by SIGIO. This was done using the usual
incantations for setting the owner of the socket to be the process group of
the process to which the socket belongs, making the socket non-blocking and
setting its ASYNC flag.

The problem arises because if I write to a socket and get back an EWOULDBLOCK
error I have no way of knowing, other than polling, when the socket again
becomes writable. I had hoped that when the state of the socket changed from
blocked to unblocked that a SIGIO would be generated but from my experiments
this appears not to be the case.

The documentation provided by Sun is quite sketchy on this matter but I had
hoped that the behaviour of SUNOS would be similar to 4.3BSD. According to
my BSD documentation when the ASYNC flag is set the kernel watches for a
change in the status of the socket and arranges to send a SIGIO when a
read or write becomes possible.

Does anyone out there know if what I'm trying to do is possible under SUNOS
and if so what I'm doing wrong? Alternatively is there an easier way of
going about solving this sort of problem?

PS. The sockets are stream sockets in the internet domain using tcp protocol.
    The work is being done on a Sun 3/50.

-----------------------------------------------------------------------------
                             Sean Holdsworth.
   EDS Group,   Room 407 IT Building,   Department of Computer Science,
   University of Manchester,   Oxford Road,  Manchester,   M13 9PL,  UK.
   Janet: HoldswoS at uk.ac.man.cs                     Tel: +44-61-275-6293
   UUCP:  ...!uunet!mcsun!ukc!man.cs!HoldswoS       Fax: +44-61-275-6280
   Inet:  HoldswoS%cs.man.ac.uk at nsfnet-relay.ac.uk  Int: 6293
-----------------------------------------------------------------------------



More information about the Comp.unix.questions mailing list