From: Vladimir Prus <ghost@cs.msu.su>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb@sources.redhat.com
Subject: Re: printfs output in wrong order in MI
Date: Thu, 13 Apr 2006 08:20:00 -0000 [thread overview]
Message-ID: <200604131201.58613.ghost@cs.msu.su> (raw)
In-Reply-To: <u1ww152q0.fsf@gnu.org>
On Thursday 13 April 2006 11:55, Eli Zaretskii wrote:
> > > Any ideas why "printf" is so special?
> >
> > I turns out that using
> >
> > printf "%x\n", &i
> >
> > (that is, adding "\n"), fixes the problem. Still looks like a bug to me,
> > though.
>
> I think it's expected behavior: printf uses buffered output,
Where in documentation is it stated that 'printf' uses buffered output?
> so if you
> don't finish the line with a newline, the buffer is not flushed.
> Similar ``bugs'' can be seen in any C program that displays characters
> via printf without \n or fflush.
Isn't it possible to auto-flush the buffer at the end of "-interpreter-exec
console" execution it's possible to flush the buffers? I think it's
reasonable to expect that *all* output of command wrapped in
"-interpreter-exec console" would appears before the "^done" marker.
- Volodya
next prev parent reply other threads:[~2006-04-13 8:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-12 16:54 Vladimir Prus
2006-04-13 8:02 ` Vladimir Prus
2006-04-13 8:10 ` Eli Zaretskii
2006-04-13 8:20 ` Vladimir Prus [this message]
2006-04-13 16:04 ` Eli Zaretskii
2006-04-14 13:38 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200604131201.58613.ghost@cs.msu.su \
--to=ghost@cs.msu.su \
--cc=eliz@gnu.org \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox