From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27084 invoked from network); 13 Oct 2020 15:48:57 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 13 Oct 2020 15:48:57 -0000 Received: (qmail 21789 invoked by uid 550); 13 Oct 2020 15:48:53 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 21766 invoked from network); 13 Oct 2020 15:48:53 -0000 MIME-Version: 1.0 Date: Tue, 13 Oct 2020 18:48:41 +0300 From: Alexey Izbyshev To: musl@lists.openwall.com In-Reply-To: References: <93cbaeffbc860a145843e0380058c50e@ispras.ru> <20201012145549.GG17637@brightrain.aerifal.cx> <20201013024737.GB7816@voyager> User-Agent: Roundcube Webmail/1.4.4 Message-ID: <6a117703dd9798bbb86eeaa6955764a9@ispras.ru> X-Sender: izbyshev@ispras.ru Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [musl] Calling setxid() in a vfork()-child On 2020-10-13 12:52, Laurent Bercot wrote: > This is one of process state change operations that are lacking in > posix_spawn(), along with being able to spawn the child as a session > leader (despite being able to spawn it as a process group leader). > Thankfully, POSIX_SPAWN_SETSID was accepted into POSIX[1] and is available in recent enough musl and glibc (and I also heard some rumors about macOS). But yes, even if we accept that simply setting some attributes for a new process is enough (as opposed to running more complex logic requiring an already created process, which is possible with fork()), having a fixed of them for an evolving entity is problematic, more so since on Linux posix_spawn() implementations are developed separately from the kernel. [1] https://www.austingroupbugs.net/view.php?id=1044