home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.protocols.tcp-ip
- Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!newsun!donp
- From: donp@novell.com (don provan)
- Subject: Re: Detecting Dropped Sockets (Why is this hard on PC's?)
- Message-ID: <1992Nov5.193518.19192@novell.com>
- Sender: news@novell.com (The Netnews Manager)
- Nntp-Posting-Host: na.sjf.novell.com
- Organization: Novell, Inc., San Jose, California
- References: <1992Oct30.212442.119@novell.com> <49191@shamash.cdc.com>
- Distribution: na
- Date: Thu, 5 Nov 1992 19:35:18 GMT
- Lines: 53
-
- In article <49191@shamash.cdc.com> gsa@easyaspi.udev.cdc.com (gary s anderson) writes:
- >I don't disagree with your statements, however, I was curious about
- >the systems you execute on. Specifically, when a process is
- >terminated, what happens to the open file descriptors?
-
- So your claim is that if i use such an operating system, then i must
- agree this behavior is correct. Sorry. Operating systems that aren't
- brain dead (most, unfortunately, no longer in production) understand
- that the file system's state shouldn't be changed unless the file
- manipulation is completed, which the application typically indicates
- by explicitly closing the file. On such operating systems,
- terminating a process (or crashing the machine, for that matter)
- leaves the *original* file unchanged, or leaves no file at all if
- there was no original file. In almost all cases, leaving a partially
- written file is absolutely the least desirable end result. But, as
- most everyone else, i'm forced to use both UNIX and DOS even though
- they both have this fault.
-
- >Aren't they typically "closed"? Doesn't TCP typically map this into
- >a "normal connection close"?
-
- And your claim here is that since UNIX believes that it understands
- how to gracefully close file descriptors, then it's OK for it to close
- TCP connections gracefully as well. Hard to argue with that if you
- truely believe UNIX defines TCP/IP. Even so, it's a shame to lose the
- useful meaning of a graceful close just because one common operating
- system thought it knew everything there was to know about any possible
- TCP application.
-
- >I assume that you would inject an RST in cases
- >where you could prove "abnormal termination". Can you cite an RFC
- >which gives guidelines as to when TCP should inject an RST on behalf
- >of the application? I'm sure we would benefit from clean, consistent
- >implementations.
-
- To my knowledge, no RFC deals with what TCP should do if its
- application disappears. Personally, i think that's because no one
- ever conceived of the UNIX behavior as a possibility, anymore than
- they thought an operating system might tend to send "Th-Th-That's all
- folks!" spontaneously down the TCP pipe.
-
- But if we take RFC-793 as gospel (and why not?), since it doesn't
- mention process termination at all, my conclusion then is that the TCP
- implementation should do nothing: the connection simply disappears.
- No FIN, no RST, no nothing. Then any subsequent packets from the
- other end of the connection would be for a non-existent connection, so
- TCP would respond with a RST. In practice, in order to expedite the
- remote node's awareness of the situation, TCP sends a RST immediately.
- This isn't significantly different than doing nothing, since it's just
- what would happen if an old packet arrived or something like that.
-
- don provan
- donp@novell.com
-