GNU bug report logs -
#47596
File descriptor error when exiting emacs on android 11
Previous Next
Reported by: Henrik Grimler <henrik <at> grimler.se>
Date: Sun, 4 Apr 2021 19:21:02 UTC
Severity: normal
Tags: moreinfo
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 47596 <at> debbugs.gnu.org (full text, mbox):
Hi,
A better way to fix the error is to use buferr instead of stderr when
calling `close_streams` in `close_output_streams`. I cannot see any
obvious problems with this, so I propose this patch:
```
--- ./src/sysdep.c.orig 2021-04-05 09:06:33.847835653 +0000
+++ ./src/sysdep.c 2021-04-05 09:05:47.957856162 +0000
@@ -2837,8 +2837,8 @@
sanitizer might report to stderr after this function is invoked.
*/
bool err = buferr && (fflush (buferr) != 0 || ferror (buferr));
if (err | (ADDRESS_SANITIZER
- ? fflush (stderr) != 0 || ferror (stderr)
- : close_stream (stderr) != 0))
+ ? fflush (buferr) != 0 || ferror (buferr)
+ : close_stream (buferr) != 0))
_exit (EXIT_FAILURE);
}
^L
```
With it I can start and exit emacs on android without the fdsan error.
Best regards,
Henrik Grimler
This bug report was last modified 2 years and 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.