From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1737 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: ldso: dlclose. Date: Fri, 24 Aug 2012 13:46:40 -0400 Message-ID: <20120824174640.GD27715@brightrain.aerifal.cx> References: <503113C5.5010206@gmail.com> <20120820004803.GA27715@brightrain.aerifal.cx> <5603ddad712718518eed1430f5d00450@exys.org> <20120823124816.GP27715@brightrain.aerifal.cx> <20120824000209.74ab2a3b@sibserver.ru> <20120823180138.GR27715@brightrain.aerifal.cx> <503732BC.1030507@gmail.com> <20120824122708.GY27715@brightrain.aerifal.cx> <50378791.4090901@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1345830307 13284 80.91.229.3 (24 Aug 2012 17:45:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2012 17:45:07 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1738-gllmg-musl=m.gmane.org@lists.openwall.com Fri Aug 24 19:45:06 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T4xwO-00078p-DI for gllmg-musl@plane.gmane.org; Fri, 24 Aug 2012 19:45:04 +0200 Original-Received: (qmail 32459 invoked by uid 550); 24 Aug 2012 17:45:02 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32451 invoked from network); 24 Aug 2012 17:45:02 -0000 Content-Disposition: inline In-Reply-To: <50378791.4090901@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1737 Archived-At: On Fri, Aug 24, 2012 at 03:54:25PM +0200, musl wrote: > I was talking about this specific case : > 1) unloding a plugin > 2) updating the plugin (new plugin.so) > 3) reloading the plugin > > During the whole sequence the application is up and running. > > Here is how I should do it if dlclose is implemented per posix : > 1) stop the application > 2) update the plugin > 3) restart the application To clarify on "per POSIX", POSIX allows but does not require dlclose on the last reference to remove the library from the process's address space, but requires that this not happen if the library has been used to resolve undefined symbols. > The application is not available during this sequence. If the application just re-execs itself rather than exiting, there is no window during which it's unavailable. See how irssi handles the /upgrade command for an example. That might be the cleanest way to handle what you want to do. Rich