Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Ultrix terminal problems



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 <P.Stephenson@xxxxxxxxxxxxx>  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.



Messages sorted by: Reverse Date, Date, Thread, Author