Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Mar 2024 15:44:35 -0400
From: Rich Felker <dalias@...c.org>
To: enh <enh@...gle.com>
Cc: sjf5462@....edu, Florian Weimer <fweimer@...hat.com>,
	Andreas Schwab <schwab@...e.de>, Alejandro Colomar <alx@...nel.org>,
	Thorsten Glaser <tg@...bsd.de>, musl@...ts.openwall.com,
	NRK <nrk@...root.org>, Guillem Jover <guillem@...rons.org>,
	libc-alpha@...rceware.org, libbsd@...ts.freedesktop.org,
	"Serge E. Hallyn" <serge@...lyn.com>,
	Iker Pedrosa <ipedrosa@...hat.com>,
	Christian Brauner <christian@...uner.io>
Subject: Re: Re: Tweaking the program name for <err.h> functions

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.