[musl] Re: Tweaking the program name for <err.h> functions

enh enh at google.com
Mon Mar 11 20:35:07 UTC 2024


On Mon, Mar 11, 2024 at 12:44 PM Rich Felker <dalias at libc.org> wrote:
>
> 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.

(that's an interesting idea. i'll have to think about that...)

> Rich


More information about the libbsd mailing list