delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/30/06:36:41

Message-Id: <199803301137.NAA26326@ieva06.lanet.lv>
From: "Andris Pavenis" <pavenis AT lanet DOT lv>
To: djgpp AT delorie DOT com, Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Date: Mon, 30 Mar 1998 14:35:19 +0000
MIME-Version: 1.0
Subject: Re: "bash"ing "cat"s.

Sorry, it looks that I forgot to add djgpp AT delorie DOT com to cc: or To:
but only answered.

------- Forwarded Message Follows -------
From:          Self <Single-user mode>
To:            Nate Eldredge <eldredge AT ap DOT net>
Subject:       Re: bash$ cat -
Date:          Wed, 25 Mar 1998 13:30:45

> Date:          Tue, 24 Mar 1998 21:55:18 -0800 (PST)
> To:            Ned Ulbricht <nedu AT ee DOT washington DOT edu>, djgpp AT delorie DOT com
> From:          Nate Eldredge <eldredge AT ap DOT net>
> Subject:       Re: bash$ cat -

> At 01:33  3/23/1998 -0800, Ned Ulbricht wrote:
> >(See below for cat/bash version info)
> >
> >When using cat within bash to read from stdin
> >
> >bash$ cat -
> >
> >then after terminating the input with ^Z (either keyboard ctrl-Z or F6),
> >subsequent cat's from stdin
> >result in cat returning immediately without accepting input. 
> [snip details]
> >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.
> 
> That seems unlikely to me, since this doesn't happen with any other of the
> textutils. (I checked.) Strange. I don't know whether to suspect `bash' or
> `cat' here; `bash' seems more likely. I can't rebuild `bash' to debug it (no
> Windows 95), so I guess someone else will have to.
> 
> >(Aside from this, it seems from the list archive/DejaNews that Daisuke
> >Aoyama hasn't posted since about last November.  Is he or anyone else
> >still working on a bash 2 port?)
> 
> I don't have ftp, so I haven't checked, but I seem to remember hearing that
> one was out. Check Simtelnet.
> 

I remeber I met the same problem rather long time ago and that was not 
bash or DJGPP related (in DOS session under Win95).

Here steps how to reproduce it (without BASH or DJGPP)
1)  compile test program (I used Borland C++ 3.1 to avoid any link with
DJGPP) Let us name it test1.c ( so we'll get test1.exe)

#include <stdio.h>
#include <conio.h>

int  main (void)
  {
      char  ch;
      while ((ch=fgetc(stdin))!=EOF)
        putch (ch);
      return 0;
  }

2) start FAR or Norton Commander in DOS session under Win95
3) run test1.exe and terminate input with Ctrl-Z
4) run test1.exe once more (for me it gets EOF IMMEDIATELLY)

Andris Pavenis

- Raw text -


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