Bug#182605: [Pkg-shadow-devel] Bug#182605: Is #182605 really belonging to passwd?

Alexander Gattin xrgtn at yandex.ru
Thu Oct 20 22:42:05 UTC 2005


Hi!

On Wed, Oct 19, 2005 at 05:36:29PM -0700, Steve Langasek wrote:
> > Yes, I see this (pre-0.80 version):
> > 1. fprintf(stderr, "%s", prompt);
> > 2. tcsetattr(STDIN_FILENO, TCSAFLUSH, ...);
> > 3. read(STDIN_FILENO, ...);
> > 4. tcsetattr(STDIN_FILENO, TCSADRAIN, ...);
> 
> > OK. Even having 2, 1, 3, 4 sequence now, don't you
> > think it's useful to have fflush(stderr) immediately
> > after fprintf(stderr, ...)?
> 
> Sorry, what problem are you trying to solve?

Excuse me for the confusion. I talk her about another
issue, similar to what we have in bug #333138.

Now I tend to agree with Robert that this is a bug,
because fact of stdin being or not being tty should not
affect buffering/flushing of stdout/stderr. At least
this behaviour is rather strange and unexpected to
majority of *nix users, admins and programmers.

Thus I just recommend you add _explicit_ fflush(stderr)
there...

-- 
WBR,
xrgtn



More information about the Pkg-shadow-devel mailing list