Thread (2 messages) flat view 2 messages, 2 authors, 2017-12-01

Re: [PATCH v4 0/2] launch_editor(): indicate that Git waits for user input

From: Andreas Schwab <hidden>
Date: 2017-11-30 15:13:33

On Nov 30 2017, Thomas Adam [off-list ref] wrote:
On Thu, Nov 30, 2017 at 02:55:35PM +0100, Lars Schneider wrote:
quoted
quoted
On 29 Nov 2017, at 19:35, Thomas Adam [off-list ref] wrote:

On Wed, Nov 29, 2017 at 03:37:50PM +0100, lars.schneider@autodesk.com wrote:
quoted
+		if (print_waiting_for_editor) {
+			fprintf(stderr, _("hint: Waiting for your editor input..."));
			fflush(stderr);
Just FYI, stderr is typically unbuffered on most systems I've used, and
although the call to fflush() is harmless, I suspect it's not having any
effect.  That said, there's plenty of other places in Git which seems to think
fflush()ing stderr actually does something.
I agree with the "unbuffered" statement. I am surprised that you expect fflush()
to do nothing in that situation... but I am no expert in that area. Can you
point me to some documentation?
Because stderr is unbuffered, it will get printed immediately.
POSIX only requires stderr to be "not fully buffered".  If it is line
buffered, the message may not appear immediately.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help