From cse.psu.edu!9fans-outgoing-owner Thu Aug 17 18:10:12 1995
Received: from colossus.cse.psu.edu ([130.203.1.2]) by cannon.ecf.toronto.edu with SMTP id <2801>; Thu, 17 Aug 1995 18:10:10 -0400
Received: by colossus.cse.psu.edu id <46225>; Thu, 17 Aug 1995 17:48:28 -0400
Received: from postman.ncube.com ([134.242.8.47]) by colossus.cse.psu.edu with SMTP id <46221>; Thu, 17 Aug 1995 17:48:03 -0400
Received: from butler.ncube.com by postman.ncube.com (4.1/SMI-4.1)
	id AA23607; Thu, 17 Aug 95 14:47:57 PDT
Received: from skynet.ncube.com by butler.ncube.com (5.0/SMI-SVR4)
	id AA05991; Thu, 17 Aug 1995 14:47:52 +0800
Date:	Thu, 17 Aug 1995 02:47:52 -0400
From:	avg@postman.ncube.com (Vadim Antonov)
Message-Id: <9508172147.AA05991@butler.ncube.com>
To:	9fans@cse.psu.edu
Subject: More bugs.
Content-Length: 941
Sender: owner-9fans@cse.psu.edu
Precedence: bulk
Reply-To: 9fans@cse.psu.edu
Status: RO

/sys/src/cmd/auth/lib/readln didn't turn raw mode off
before sending newline (which caused some funny behaviour
if the server translates the newline differently in
raw and cooked modes).  Also, in some cases closed
stream could be interpreted as DEL by readln.

The quick fix is appended.  As always, the real fix
would be to make echo-on and echo-off _separate_
from raw-on and raw-off.  I remember seeing the same
kind of problem in Unix version 6.  I guess aliens from
outer space kept somebody in suspended animation all
those years :)


--vadim

naiad% pwd
/sys/src/cmd/auth/lib
naiad% diff readln.c.old readln.c
49,50d48
<               if(*p == 0x7f)
<                       exits(0);
53c51,52
<                       if(raw)
---
>                       if(raw) {
>                               write(ctl, "rawoff", 6);
54a54
>                       }
58a59,60
>               if(*p == 0x7f)
>                       exits(0);
naiad%


