question about non-blocking I/O and SIGPIPE
Sundar Narasimhan
sundar at ai.mit.edu
Mon Mar 25 08:23:43 AEST 1991
Hi: I have a server that is writing data on a socket to a client.
The socket has been marked for non-blocking I/O using the FIONBIO
ioctl. Now, what I need to know is exactly under what conditions
will a SIGPIPE be generated on the server.
I've read the man pages, but this info is not found anywhere.
They say that write() will return -1 and errno will be set to
EWOULDBLOCK when the buffers are full. write() can return a
value less than the bc passed to it, in case the operation would
block, in which case, the manual says the write should be tried
again. (I'm reading this on a Sparc (Sun OS 4.1.1) and my code
is to run on a Pyramid SysV Unix -- which makes it even more
confusing since FIONBIO works differently under SysV).
I know all this sounds kinda vague but I'll be happy to explain
it in more detail -- you see I have this server that's dying with
SIGPIPE's and I'd like to know how to fix it right (instead of just
patching it).
More information about the Comp.unix.programmer
mailing list