home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / internal / 2080 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1.0 KB

  1. Path: sparky!uunet!auspex-gw!guy
  2. From: guy@Auspex.COM (Guy Harris)
  3. Newsgroups: comp.unix.internals
  4. Subject: Re: Does dlopen consume a fd?
  5. Message-ID: <16068@auspex-gw.auspex.com>
  6. Date: 23 Dec 92 20:01:36 GMT
  7. References: <1992Dec23.143819.27180@rwwa.COM>
  8. Sender: news@auspex-gw.auspex.com
  9. Distribution: usa
  10. Organization: Auspex Systems, Santa Clara
  11. Lines: 12
  12. Nntp-Posting-Host: auspex.auspex.com
  13.  
  14. >The documentation is mute on this point.  If one dlopens 30 shared
  15. >objects (with no dlcloses), has one consumed 30 fds?
  16.  
  17. Modulo bugs in the library, no, one hasn't, at least not in SunOS
  18. 4.1[.x], and probably not in SVR4, either.
  19.  
  20. SunOS 4.x "mmap()" is different from the "mmap()" originally proposed by
  21. Berkeley, in that if the file descriptor used in the "mmap()" is closed,
  22. mappings established with that FD are *not* removed.  This was done, in
  23. part, precisely to *avoid* having shared libraries - and "dlopen()"ed
  24. objects - consume file descriptors.  SVR4's "mmap()" behaves in that
  25. fashion, and I think BSD's new "mmap()" does so as well.
  26.