From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 17 Aug 1995 02:47:52 -0400 From: Vadim Antonov avg@postman.ncube.com Subject: More bugs. Topicbox-Message-UUID: 17adf042-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19950817064752.rXTG3LCzjtnMFIRreHZVz8RYGIov-LoMkfVPQO5arvc@z> /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%