Re: How Can I call close() for all
- From: Joe Pfeiffer <pfeiffer@xxxxxxxxxxx>
- Date: Tue, 27 Nov 2007 23:19:42 -0700
David Schwartz <davids@xxxxxxxxxxxxx> writes:
On Nov 27, 8:17 am, Joe Pfeiffer <pfeif...@xxxxxxxxxxx> wrote:
sreyas.j...@xxxxxxxxx writes:
That depends on the client, and what you mean by graceful. Next time
they try to do IO on the socket, the call will fail. What happens
next is up to the client.
Sadly, it is not guaranteed that it will fail. It may succeed and do
something very different from what you wanted.
Your comments in this thread have surprised me a lot -- my impression
has always been that when one end of a socket connection goes away,
the connection is broken. You've been saying (if I understand
correctly) that another process can jump in and grab the port that is
the server's end of the socket, and the client will find itself
talking to the new process.
I'm a bit confused as to how this can happen (before I go any further,
please, if I misunderstood your previous posts, correct me!) -- after
all, when a client connects to the server, a new randomly-numbered
socket is created and the file descriptor returned from accept() is
connected to this socket. How does a new process go about using this
socket after the original server closes its connection? Does it
bind() to it?
Anyway, I'd be very interested in looking at some cites showing me how
this is done....
.
- Follow-Ups:
- Re: How Can I call close() for all
- From: David Schwartz
- Re: How Can I call close() for all
- References:
- How Can I call close() for all
- From: sreyas . jose
- Re: How Can I call close() for all
- From: Chris McDonald
- Re: How Can I call close() for all
- From: Rainer Weikusat
- Re: How Can I call close() for all
- From: sreyas . jose
- Re: How Can I call close() for all
- From: Joe Pfeiffer
- Re: How Can I call close() for all
- From: David Schwartz
- How Can I call close() for all
- Prev by Date: What does an eval $* do in a runscript shell?
- Next by Date: Re: How Can I call close() for all
- Previous by thread: Re: How Can I call close() for all
- Next by thread: Re: How Can I call close() for all
- Index(es):
Relevant Pages
|
|