From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from brightrain.aerifal.cx (brightrain.aerifal.cx [IPv6:2001:19f0:5:42::1]) by sourceware.org (Postfix) with ESMTPS id ACC913858D20 for ; Mon, 11 Mar 2024 19:44:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ACC913858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=libc.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=libc.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ACC913858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:19f0:5:42::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710186259; cv=none; b=ZC3otWw1ozY6itNnq9pXH3nTV3WLOAJcuQaDsS0ttnLH8EWLPDbCzfRb8J4BWUgNAO0EQqoczEoWrHSyXvfRD61YFsTbJOb3byEnnFeOK5wxc2jbTlZnABJA/bHv9EwfHjulYvxMHtpbybAIDhD6ixnNQE6R5SyusJfMQn+25Ck= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710186259; c=relaxed/simple; bh=JgPTKIlS/W5Wk20KL3rkOv5Axg8b/RObYUJnBKykZfU=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=MfULP90svlH/WYCnk0BeHjncE9rNf+OSTb6Y1trUUrlgOfQkui7AWiNHtsqWGWqhJjuRxe+rXPI49B86mZP73NGUbkCbhUsKevuGzJW3AByeDX+CEUOsgr/woCra9AJtf64iTukk04J3BcWNvoYBWtcl1XMmiNn6Uy3213/LR00= ARC-Authentication-Results: i=1; server2.sourceware.org Date: Mon, 11 Mar 2024 15:44:35 -0400 From: Rich Felker To: enh Cc: sjf5462@rit.edu, Florian Weimer , Andreas Schwab , Alejandro Colomar , Thorsten Glaser , musl@lists.openwall.com, NRK , Guillem Jover , libc-alpha@sourceware.org, libbsd@lists.freedesktop.org, "Serge E. Hallyn" , Iker Pedrosa , Christian Brauner Subject: Re: [musl] Re: Tweaking the program name for functions Message-ID: <20240311194435.GX4163@brightrain.aerifal.cx> References: <20240310234410.GW4163@brightrain.aerifal.cx> <875xxsljax.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Mar 11, 2024 at 12:05:11PM -0700, enh wrote: > Android's libc actually does do this for everything except for > first-stage `init`, the one process that doesn't have a /dev/null > equivalent available yet: > https://android.googlesource.com/platform/bionic/+/master/libc/bionic/libc_init_common.cpp#358 In the absence of /dev/null, you could probably call pipe() and close the unwanted end. This works with no fs available, and has the "bonus" that you'll get a nice SIGPIPE crash if you accidentally try to write anything to it. Rich