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