From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5941 Path: news.gmane.org!not-for-mail From: Laurent Bercot Newsgroups: gmane.linux.lib.musl.general Subject: Re: static build and dlopen Date: Wed, 27 Aug 2014 19:48:06 +0100 Message-ID: <53FE27E6.60902@skarnet.org> References: <20140827164309.GO12888@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1409165294 15011 80.91.229.3 (27 Aug 2014 18:48:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2014 18:48:14 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5948-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 27 20:48:08 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 1XMiGO-0000fV-23 for gllmg-musl@plane.gmane.org; Wed, 27 Aug 2014 20:48:08 +0200 Original-Received: (qmail 9874 invoked by uid 550); 27 Aug 2014 18:48: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 9864 invoked from network); 27 Aug 2014 18:48:07 -0000 X-SourceIP: 80.111.163.198 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:5941 Archived-At: On 27/08/2014 18:10, piranna@gmail.com wrote: > Yes, I though about this option before, has a dumb statically linked > executable to work as PID 1 that just only exec Node.js and wait until > it finishes, so I can use a standard dynamically linked one and do > whatever I want I don't understand why you can't do whatever you want anyway. You can run Node.js as PID 1 even if it is dynamically linked - you just need to have the libc (and ld-musl.so) in the filesystem. It will work. You can run anything as PID 1 provided all its dependencies are there at boot time. Traditional inits are usually dynamically linked - which I think is a very bad idea, but that's another subject. If Node.js is a special case that cannot be treated that way, then I'm interested in hearing why. -- Laurent