From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14758 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: Hangup calling setuid() from vfork() child Date: Mon, 30 Sep 2019 22:27:28 +0200 Message-ID: <20190930202727.GT22009@port70.net> References: Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="96443"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) To: musl@lists.openwall.com Original-X-From: musl-return-14774-gllmg-musl=m.gmane.org@lists.openwall.com Mon Sep 30 22:27:43 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iF2Gk-000Ozj-Mx for gllmg-musl@m.gmane.org; Mon, 30 Sep 2019 22:27:42 +0200 Original-Received: (qmail 27657 invoked by uid 550); 30 Sep 2019 20:27:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 26610 invoked from network); 30 Sep 2019 20:27:39 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:14758 Archived-At: * Joshua Hudson [2019-09-30 12:57:34 -0700]: > >It's simpler than that. The (retired) specification for vfork did not > >allow anything but _exit or execve in the child after vfork, so the > >issue doesn't arise and it works perfectly fine with threads as long > >as you follow the requirement. > > I'm reading the man page for vfork and it says what it actually does, that > is overlay the child process on the memory of the calling process. the internals don't matter, the interface contract is that you can only call exec* or _exit in the child. > > posix_spawn can't be used in the originating location, and fork() is why? > hogging too much memory.