Re: read/recv sometimes returns EAGAIN instead of EINTR on SMP machines

From: David S. Miller (davem@redhat.com)
Date: Mon Jul 22 2002 - 21:57:49 EST


   From: Peter Niemayer <niemayer@isg.de>
   Date: Mon, 22 Jul 2002 12:43:14 +0200
   
   If one process tries to read non-blocking from a tcp socket (domain sockets work
   fine), and another process sends the reading process signals, then sometimes
   select() returns with the indication that the socket is readable,
   but the subsequent read returns EAGAIN - instead of EINTR which
   would have been the correct return code. This only happenes on SMP
   machines.

I think EAGAIN is the correct return value. This behavior has been
there since the stone ages of TCP and I remember Alan specifically
auditing all of this stuff long ago wrt. POSIX compliance.

Can you cite some part of the POSIX spec which states that EAGAIN
cannot be returned when signals are received by a caller of
tcp_recvmsg?

   
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:41 EST