Path: csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail From: Bob Proulx Newsgroups: gnu.bash.bug Subject: Re: Why does a Bash shell script write prompts followed by reads and do it right? Date: Wed, 2 Sep 2015 14:22:59 -0600 Lines: 15 Approved: bug-bash@gnu.org Message-ID: References: <1441218426.1517.2.camel@16bits.net> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1441225386 10352 208.118.235.17 (2 Sep 2015 20:23:06 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: Robert Parker Envelope-to: bug-bash@gnu.org Mail-Followup-To: Robert Parker , bug-bash@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 216.17.153.58 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11469 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