GNU bug report logs -
#44320
[PATH] [27.1] Make sure send-string-to-terminal send all contents
Previous Next
Reported by: Lin Sun <lin.sun <at> zoom.us>
Date: Thu, 29 Oct 2020 23:03:02 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 44320 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 2 Nov 2020 11:11:22 +0800
> From: LinSun <lin.sun <at> zoom.us>
> Cc: "44320 <at> debbugs.gnu.org" <44320 <at> debbugs.gnu.org>
>
> Attach the log file ` testing-strace-2.log.gz` with a line more which may be a import hints.
>
> write(6, "…", 256) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
Thanks.
I don't think I know how to interpret this trace, or understand the
significance of ERESTARTSYS. Was this trace collected with or without
your change in send-string-to-terminal? did fwrite succeed to write
the entire string or did it write only part of it, and if the latter,
which part was successfully written?
All I see in the trace is a series of calls to 'write' syscall,
progressively writing a large string in chunks of 4K bytes, which
seems normal. 'fwrite' is documented to return an error indication if
it doesn't succeed to write the entire buffer, but you didn't show the
return value of 'fwrite' nor what 'fflush' after it returned, so it is
hard to know what exactly happened.
I think we must understand what happens here and why, because we call
'fwrite' in 2 dozen other places, and it makes little sense to fix
only one of them. The function where you propose the change calls
'fwrite' twice, but you suggested to fix only one of these two calls,
which also sounds strange to me. Moreover, I don't think I see any
documentation saying that 'fwrite' can, let alone should be expected
to, fail to write the entire buffer without returning some error
indication. On what OS do you see the problem?
This bug report was last modified 4 years and 288 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.