setsockopt(), POLLHUP event

From: Thomas Richter (thor_at_cleopatra.math.tu-berlin.de)
Date: 03/29/04


Date: 29 Mar 2004 13:30:22 GMT


I've a question concerning the events returned by the poll() system call.
In the code I'm reviewing here, a socket gets created, then the socket
parameters are changed by setsockopt(), and then a poll() is run on
the created socket, waiting on the event POLLOUT. However, the poll
does not return a POLLOUT event, but rather POLLERR|POLLHUP on the
socket "id". The other machine is, however, still in the network
(I can reach it under the id by ssh, ping, etc.).

Any ideas what this error means and which part of the network
went crazy?

So long,
        Thomas



Relevant Pages

  • Re: timeout problem while using poll()
    ... POLLIN to use same socket descriptor both sending and reading, ... it's fine to read and write on the same socket. ... POLLOUT has to be set whenever the socket is being used for output at ... calling poll() with POLLOUT first. ...
    (comp.unix.programmer)
  • Re: timeout problem while using poll()
    ... POLLIN to use same socket descriptor both sending and reading, ... it's fine to read and write on the same socket. ... calling poll() with POLLOUT first. ...
    (comp.unix.programmer)
  • Re: Network compatibility and performance
    ... Network throughput is seriously defective with linux-2.6.16.24 ... Did you set non-blocking? ... A connected TCP socket. ... same socket is used for reading, using poll() ...
    (Linux-Kernel)
  • Re: implementing a time bound wait on the socket (TCP)
    ... Poll() method isn't reliable (the Socket may become unreasonable between   ... The ongoing design on the client side is not in ... a response in a byte buffer (there are no intentional delays on the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: scalable TCP server design
    ... pollfd to -1 or by clearing the events member, ... As I explained, it's not a limitation, it's a feature. ... One reason why not calling 'poll' or 'select' until after you call ... You discover one socket ready for I/O. ...
    (comp.unix.programmer)