home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / protocol / tcpip / 5148 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  2.7 KB

  1. 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
  2. From: ddl@burrhus.harvard.edu (Dan Lanciani)
  3. Newsgroups: comp.protocols.tcp-ip
  4. Subject: Re: Detecting Dropped Sockets (Why is this hard on PC's?)
  5. Message-ID: <1992Nov13.033719.8300@burrhus.harvard.edu>
  6. Date: 13 Nov 92 03:37:19 GMT
  7. References: <1992Oct30.212442.119@novell.com> <49191@shamash.cdc.com> <921112165655@cream.ftp.com>
  8. Distribution: na
  9. Organization: Harvard University, Cambridge, MA
  10. Lines: 38
  11.  
  12. In article <921112165655@cream.ftp.com>, jbvb@vax.ftp.com  (James B. VanBokkelen) writes:
  13. | In article <49191@shamash.cdc.com> gsa@easyaspi.udev.cdc.com (gary s anderson) writes:
  14. |     I don't disagree with your statements, however, I was curious about
  15. |     the systems you execute on.  Specifically, when a process is
  16. |     terminated, what happens to the open file descriptors?  Aren't they
  17. |     typically "closed"?  Doesn't TCP typically map this into a "normal
  18. |     connection close"?
  19. | This is one of the places where attempts to "make network connections look
  20. | just like files" start to get rocky.  The "close on termination" happens
  21. | because 1) close is an operation that already exists, thus it's easy,
  22. | 2) close is most likely to preserve data and abet debugging, and 3)
  23. | close is necessary for overall filesystem consistency.  There are many
  24. | times I've wished I could find out "file closed during program abort"
  25. | from a directory listing, but OS designers haven't gotten that far.  TCP
  26. | can (and in my opinion, should) be more informative.
  27.  
  28.     Curiously enough, the old 2.9BSD (aka 4.1c) networking code
  29. went to some lengths to get an indication of whether a socket was
  30. closed explicitly by the process.  As I recall, this involved a
  31. new argument to the internal kernel closef() function and, of course,
  32. changes to every call to said function.  The argument was passed
  33. as true when the process actually called close() and false when
  34. closef() was invoked as part of exit handling.  (It may not have been
  35. completely obvious which way things went on an implicit close caused
  36. by, e.g., dup2(). :)
  37.     After all this bother, the tcp/ip code did very little with
  38. the information.  I don't remember whether this was because of a
  39. real bug or because of a ``fix'' to correct problems caused by
  40. doing something extreme like sending RST.  The original intent
  41. was almost certainly to prevent processes from getting hung in
  42. an exiting state, rather than to inform the peer that something
  43. funny had happened.  In any case, the code disappeared long before
  44. 4.3BSD but at least it has been tried...
  45.  
  46.                 Dan Lanciani
  47.                 ddl@harvard.*
  48.