Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11469

Re: Why does a Bash shell script write prompts followed by reads and do it right?

From Bob Proulx <bob@proulx.com>
Newsgroups gnu.bash.bug
Subject Re: Why does a Bash shell script write prompts followed by reads and do it right?
Date 2015-09-02 14:22 -0600
Message-ID <mailman.421.1441225386.19560.bug-bash@gnu.org> (permalink)
References <CAAykW6m4H2sSshWNfv3mQr9q6ScKzLebqMBgEo96vRUSBY6SAQ@mail.gmail.com> <1441218426.1517.2.camel@16bits.net> <CAAykW6mnTcLA21h79YDb_4-Pv3GhG_8xBhhNcG0unzYpkfqGMQ@mail.gmail.com>

Show all headers | View raw


Robert Parker wrote:
>         fputs(shortprompt, stdout);
>         fflush(stdin);

Uhm...  fflush'ing stdin?  That doesn't make sense.  Obviously you
meant to flush stdout.

        fputs(shortprompt, stdout);
        fflush(stdout);

That is likely the specific problem.  Unfortunately I have no time for
comments about the rest of the code.

Bob

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Why does a Bash shell script write prompts followed by reads and do it right? Bob Proulx <bob@proulx.com> - 2015-09-02 14:22 -0600

csiph-web