home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!know!hri.com!noc.near.net!news.bbn.com!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!ogicse!das-news.harvard.edu!husc-news.harvard.edu!burrhus!ddl
- From: ddl@burrhus.harvard.edu (Dan Lanciani)
- Newsgroups: comp.protocols.tcp-ip
- Subject: Re: Detecting Dropped Sockets (Why is this hard on PC's?)
- Message-ID: <1992Nov13.033719.8300@burrhus.harvard.edu>
- Date: 13 Nov 92 03:37:19 GMT
- References: <1992Oct30.212442.119@novell.com> <49191@shamash.cdc.com> <921112165655@cream.ftp.com>
- Distribution: na
- Organization: Harvard University, Cambridge, MA
- Lines: 38
-
- In article <921112165655@cream.ftp.com>, jbvb@vax.ftp.com (James B. VanBokkelen) writes:
- | 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? Aren't they
- | typically "closed"? Doesn't TCP typically map this into a "normal
- | connection close"?
- |
- | This is one of the places where attempts to "make network connections look
- | just like files" start to get rocky. The "close on termination" happens
- | because 1) close is an operation that already exists, thus it's easy,
- | 2) close is most likely to preserve data and abet debugging, and 3)
- | close is necessary for overall filesystem consistency. There are many
- | times I've wished I could find out "file closed during program abort"
- | from a directory listing, but OS designers haven't gotten that far. TCP
- | can (and in my opinion, should) be more informative.
-
- Curiously enough, the old 2.9BSD (aka 4.1c) networking code
- went to some lengths to get an indication of whether a socket was
- closed explicitly by the process. As I recall, this involved a
- new argument to the internal kernel closef() function and, of course,
- changes to every call to said function. The argument was passed
- as true when the process actually called close() and false when
- closef() was invoked as part of exit handling. (It may not have been
- completely obvious which way things went on an implicit close caused
- by, e.g., dup2(). :)
- After all this bother, the tcp/ip code did very little with
- the information. I don't remember whether this was because of a
- real bug or because of a ``fix'' to correct problems caused by
- doing something extreme like sending RST. The original intent
- was almost certainly to prevent processes from getting hung in
- an exiting state, rather than to inform the peer that something
- funny had happened. In any case, the code disappeared long before
- 4.3BSD but at least it has been tried...
-
- Dan Lanciani
- ddl@harvard.*
-