From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6006 Path: news.gmane.org!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Retention of LD_LIBRARY_PATH Date: Sun, 31 Aug 2014 14:25:18 +0400 (MSK) Message-ID: 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 1409480837 18127 80.91.229.3 (31 Aug 2014 10:27:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 31 Aug 2014 10:27:17 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6013-gllmg-musl=m.gmane.org@lists.openwall.com Sun Aug 31 12:27:10 2014 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 1XO2Lk-0007jV-Fp for gllmg-musl@plane.gmane.org; Sun, 31 Aug 2014 12:27:08 +0200 Original-Received: (qmail 24566 invoked by uid 550); 31 Aug 2014 10:27:07 -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 24558 invoked from network); 31 Aug 2014 10:27:07 -0000 User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) Xref: news.gmane.org gmane.linux.lib.musl.general:6006 Archived-At: (related to setproctitle discussion on IRC) The dynamic loader in musl retains a pointer to LD_LIBRARY_PATH from the initial environment, which is exposed to the application via 'char **environ'. Changes to environ may cause subsequent calls to dlopen to use different search paths, but modifications via setenv and putenv do not have such effect. dlopen(3) in Linux man pages mentions specifically that the value of LD_LIBRARY_PATH from program start up is used. Glibc stores a duplicate of the initial value, and modifications to the environment do not affect search paths for dlopen. Alexander