Date: Wed, 25 Mar 1998 08:54:46 +0300 (IDT) From: Eli Zaretskii To: Ned Ulbricht cc: djgpp AT delorie DOT com Subject: Re: bash$ cat - In-Reply-To: <3516D510.35CB@ee.washington.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 23 Mar 1998, Ned Ulbricht wrote: > bash$ cat - > > then after terminating the input with ^Z (either keyboard ctrl-Z or F6), > subsequent cat's from stdin > > bash$ cat - > > result in cat returning immediately without accepting input. Confirmed. > It seems to me that this is likely caused by the ^Z remaining buffered > somewhere in the input stream and being resent to cat on the subsequent > invocations under bash. Yep, that's what's probably going on. The question is: what does Bash do to cause this? I'm afraid the answer is in the sources of the ported Bash. I looked at the sources of `cat' and tried to understand what would cause this, but didn't see anything. (Curiously, other similar programs, like `tac', don't have this problem.) In any case, if ^Z is left in the stream, it's Bash's stream, since `cat' exits and its buffers are flushed.