From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id FAA26961 for ; Wed, 7 Jun 1995 05:21:51 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA00753 (5.65c/Gatech-10.0-IDA for ); Tue, 6 Jun 1995 15:20:20 -0400 Received: by math (5.x/SMI-SVR4) id AA24165; Tue, 6 Jun 1995 11:53:31 -0400 Resent-Date: Tue, 06 Jun 95 16:38:36 +0100 Old-Return-Path: Message-Id: <26192.9506061538@pyro.swan.ac.uk> Pp-Warning: Illegal Via field on preceding line To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Ultrix terminal problems Date: Tue, 06 Jun 95 16:38:36 +0100 From: P.Stephenson@swansea.ac.uk X-Mts: smtp Resent-Message-Id: <"mb9s13.0.Rv5.wd7rl"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/78 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I just discovered that with the new code for reading from the terminal, if you type a complete line (ending with a newline) before the shell has started up under Ultrix 4.3, the line is ignored. Worse, it messes up subsequent terminal handling: there is no redisplay until you hit return, for example. You can get out of this mess by reading lines from 0 (just `read line' will do the trick) until the backlog is cleared. This seemed to be fixable. "Aha!" I thought, "suppose we make the shell use fd 0 to read if that's the terminal. Assigning SHTTY = 0 will do this, saving an fd unless we later have to re-open it for output becuase fd 0 is read only." Well, that didn't work. The shell was doing all input from FD 0, which was opened to the terminal (I checked this with dbx). However, typing a line before the shell started had exactly the same effect as before: in other words the line was still stuck there, apparently waiting for fd 0 to be read in canonical mode before it got rid of it. Does anyone understand this? Does anyone know how to fix it? It must be fixable, because not only does ksh not have this problem, as soon as you exec it it extracts the old line from standard input which zsh didn't get. I tried OSF/1 3.0, Solaris 2.3 and Sunos 4.1.1 and none of them had this behaviour. -- Peter Stephenson Tel: +44 1792 205678 extn. 4461 WWW: http://python.swan.ac.uk/~pypeters/ Fax: +44 1792 295324 Department of Physics, University of Wales, Swansea, Singleton Park, Swansea, SA2 8PP, U.K.