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

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 06 May 2021 12:45:17 +0200

Henrik Grimler <[email-masked]> writes:

>> > In emacs fdopen is run in init_standard_fds, where we have
>> > 
>> >   force_open (STDERR_FILENO, O_RDONLY);
>> > 
>> >   /* Set buferr if possible on platforms defining _PC_PIPE_BUF, as
>> >      they support the notion of atomic writes to pipes.  */
>> >   #ifdef _PC_PIPE_BUF
>> >     buferr = fdopen (STDERR_FILENO, "w");
>> >     if (buferr)
>> >       setvbuf (buferr, NULL, _IOLBF, 0);
>> >   #endif
>> > }
>> 
>> This just creates a copy of stderr that has special buffering. 
>> Again,
>> entirely valid for a C program to do that.
>
> I probably should have included a bit more context in the android bug
> report to better show what the code does. 

Did you try to include this context in the Android bug report and see
what they say then?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no