Article View: comp.unix.internals
Article #2407Re: Does dlopen consume a fd?
From: Guy Harris
Date: Wed, 23 Dec 1992 20:01
Date: Wed, 23 Dec 1992 20:01
12 lines
1068 bytes
1068 bytes
>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.
Technical Details
Message-ID:
<16068@auspex-gw.auspex.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!auspex-gw!guyReferences:
<1992Dec23.143819.27180@rwwa.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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