tcp socket problems
From: Jeff (joesiege_at_gmail.com)
Date: 04/15/05
- Next message: Jens.Toerring_at_physik.fu-berlin.de: "Re: modprobe question"
- Previous message: Matthias Buelow: "Re: SIGSEGV handler"
- Next in thread: David Schwartz: "Re: tcp socket problems"
- Reply: David Schwartz: "Re: tcp socket problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 15 Apr 2005 14:21:30 -0700
What can I say, I thought I used due dilligence. I wrote a client in C
that is having difficulty when the server does bad things. The symptom
manifests itself with EBADF on close(sock); I should have never reached
this point, but some guy named Murphy just loves poking his nose into
socket programming.
When we reach close(sock) and it sets the errno to EBADF, the program
is still okay. The problem is, I reuse that socket descriptor. It's at
that point, that bad things happen. (Usually it gets stuck in close).
What are some good strategies for recovering from a bad file descriptor
or never getting in that situation in the first place?
Here's my socket functions if anybody cares to peruse them:
ftp://ftp.joedog.org/pub/siege/beta/sock.c
ftp://ftp.joedog.org/pub/siege/beta/sock.h
Jeff
- Next message: Jens.Toerring_at_physik.fu-berlin.de: "Re: modprobe question"
- Previous message: Matthias Buelow: "Re: SIGSEGV handler"
- Next in thread: David Schwartz: "Re: tcp socket problems"
- Reply: David Schwartz: "Re: tcp socket problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|