www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/25/03:11:58

Date: Wed, 25 Mar 1998 08:54:46 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Ned Ulbricht <nedu AT ee DOT washington DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: bash$ cat -
In-Reply-To: <3516D510.35CB@ee.washington.edu>
Message-ID: <Pine.SUN.3.91.980325085309.27363E-100000@is>
MIME-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019