Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: How do I get "filec" to work on a pty? Keywords: csh, pty, filec, pseudo, terminal Message-ID: <3145@auspex.auspex.com> Date: 7 Apr 90 21:53:48 GMT References: <1990Apr7.153651.7273@cec1.wustl.edu> Organization: Auspex Systems, Santa Clara Lines: 43 >I'm having trouble getting the C-shell "filec" flag to do its thing >correctly on a pseudo terminal. It's difficult to get much of *anything* to "do its thing correctly" on a pseudo-terminal, if all you have is a pseudo-terminal and nothing on the master side. If you have some program on the master side, that program is as much a part of the tty subsystem as the pseudo-tty itself, so in order for somebody to advise you, you have to indicate what you're running on the master side.... For instance, it seems to work just fine in: SunView's "shelltool" X11's "xterm" XView's "shelltool" under X11 "script" "rlogin" "telnet", at least when no fancy line-mode stuff is being done and fails under SunView's "cmdtool" and probably Andrew's "tm" under X11, for related but different reasons. >I open the pty and set the mode to be ~(RAW | LCASE | CBREAK) and >(FF0 | ECHO | CRMOD). Can I infer from this that you're writing your own program to handle the pseudo-tty? If so, does your program run the pseudo-tty in "remote" mode (TIOCREMOTE) or not? If it does not - i.e., your program is more-or-less acting like a dumb terminal, supplying raw keystrokes to the pseudo-tty with no echoing or special input processing and displaying output from the pseudo-tty - then assuming you've set up the pseudo-tty correctly (your setup seems OK) it should work. If it *does*, you have a problem, in that the C shell performs various unnatural acts to implement filename completion, and your program may not find out about those acts. Some pseudo-tty implementations don't let you find out about them at all; others don't let you do so well enough to make this stuff work; others do so well enough to force you to figure out how to handle them....