Path: utzoo!attcan!uunet!lll-winken!lll-tis!oodis01!uplherc!esunix!bpendlet From: bpendlet@esunix.UUCP (Bob Pendleton) Newsgroups: comp.unix.wizards Subject: Re: Input Line Editing Message-ID: <918@esunix.UUCP> Date: 15 Jul 88 17:15:48 GMT References: <23839@bu-cs.BU.EDU> Organization: Evans & Sutherland, Salt Lake City, Utah Lines: 45 From article <23839@bu-cs.BU.EDU>, by bzs@bu-cs.BU.EDU (Barry Shein): > What I don't like about just putting it into a shell is that it then > conflicts with habits when using a simple program which just does > reads, a human interface issue. I also like the idea that any > programmer's program (even a neophyte's own) tends to work more or > less as well as the shell on really visible things like input editing. Which is why I wrote ile. > I haven't looked at the Unix COMND routines from, I believe, Columbia, > perhaps I (we) should. Don't know anything abou them. Hoew about sending me a pointer? > The other question is, if it's done as an intermediate process how > does the process know when to step out of the way because a newly > started job is doing its own style of input editing? (yes, I'm bracing > myself for the answer...) Ile uses a pty to control io to the subprocess. So it just does an ioctl to check the mode at times when the mode could have changed. This works ok for raw and cbreak mode, but because ile wants to echo characters itself it doesn't work very well when a program (like su) just clears echo on the pty. Using this technique means that ile can do an ioctl call for each character it processes. I'm starting to think that the "right" thing would be for the pty to cause an exception every time an ioctl changes the ptys mode. The exception can be handled through code controlled by a select(). It would have to be an exception that could be ignored or else the change will break to much of the world. Everything else I've been able to think of can be handled by machs' concept of an environment server (I think). > -Barry Shein, Boston University Bob P. -- Bob Pendleton @ Evans & Sutherland UUCP Address: {decvax,ucbvax,allegra}!decwrl!esunix!bpendlet Alternate: utah-cs!esunix!bpendlet I am solely responsible for what I say.