public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Non-Blocking socket (SOCK_STREAM send)
@ 2000-12-14 23:12 Adam Scislowicz
  2000-12-14 23:20 ` Andi Kleen
  2000-12-15 22:10 ` Non-Blocking socket (SOCK_STREAM send) - SOLVED Adam Scislowicz
  0 siblings, 2 replies; 7+ messages in thread
From: Adam Scislowicz @ 2000-12-14 23:12 UTC (permalink / raw)
  To: linux-kernel

Could someone explain why send is failing with EPIPE on the 2.4.x
kernel, while it is working with the 2.2.x kernels.

The PsuedoCode:
sock = socket(AF_INET, SOCK_STREAM, 0)
buf = fcntl(sock, F_GETFL)
fcntl(sock, F_SETFL, buf | O_NONBLOCK) // we check the SETFL return
value, it succeeds
while ((retval = connect(sock, addr, sizeof(struct sockaddr_in))) < 0)
{
  if (retval < 0) {
   if (errno != EINPROGRESS) return -1; // return failure
 }
} // the connect succeeds during first iteration with return value of 0.

send(sock, msg, msg_length, 0) // this connection is to the thttpd web
server on the same host. XXX
XXX: send fails with EPIPE on the 2.4.0-test11-ac 4 and 2.4.0-test12
kernels, whereas it does not fail on 2.2.14-5.0(redhat kernel)

More Info:
 thttpd is working properly on the 2.4.x machine, I can access it via
Netscape, our software is a proxy.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-12-15 22:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-14 23:12 Non-Blocking socket (SOCK_STREAM send) Adam Scislowicz
2000-12-14 23:20 ` Andi Kleen
2000-12-14 23:26   ` Adam Scislowicz
2000-12-14 23:35     ` Andi Kleen
2000-12-14 23:54       ` Adam Scislowicz
2000-12-15  0:03         ` Andi Kleen
2000-12-15 22:10 ` Non-Blocking socket (SOCK_STREAM send) - SOLVED Adam Scislowicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox