Subject: Re: bug#47596: File descriptor error when exiting emacs on android 11

From: Eli Zaretskii <[email-masked]>
Date: Wed, 12 May 2021 17:01:36 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 12 May 2021 15:52:52 +0200
> 
> Henrik Grimler <[email-masked]> writes:
> 
> > Could this work or do we need to have both buferr and stderr?
> 
> Makes sense to me, but I seem to vaguely recall there being a lot of
> discussion about the buffered stderr when it was introduced...  but none
> of the details.  Eli?

We need them both, yes.  The second one was introduced for a reason,
so removing it would give us back the problems it solved.

setlinebuf is not portable enough, and line buffering isn't supported
on MS-Windows anyway.  Maybe we could make some archlinux specific
change, although that's ugly.

And I'm worried that we don't actually understand the nature of the
problem well enough: our code doesn't close both FILE streams, it
closes at most only one.  So this sounds to me like a false positive
of the sanitizer, not a real problem with our code...