rob@lafayet.UUCP (Rob Freyder) (09/22/90)
Hi Folks, I have some simple questions. At least I think they might be. 8-) First, What is a psuedo-tty ? I cant find it in any of my books or manuals. Second, Whais select() used for ? I just found a program called tapserial that I want to compile and its needs select() which is broken on Xenix 2.3 ... So I installed the XNX141 SLS to fix it. Again, I looked and cant find any info on select(). I found it in the curses library but couldnt locate any docs on it. Anybody know anything about the tapserial program and its usage ? The usage message is rather vague. Thanks ...Rob. -- Rob Freyder Core Laboratories a division of ____ ____ ____ Western Atlas International Inc. \ \ / /\ / /\ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- \ \/ / \ / / \ Humans (318) 235-9431 \ / / \ / /\ \ Internet rob@lafayet.UUCP \/___/ \/___/ \___\ Bang ...!uunet!lafayet!rob
sarima@tdatirv.UUCP (Stanley Friesen) (09/28/90)
In article <783@lafayet.UUCP> rob@lafayet.UUCP (Rob Freyder) writes: >Hi Folks, > I have some simple questions. At least I think they might be. 8-) > >First, What is a psuedo-tty ? I cant find it in any of my books or manuals. A pseudo-tty is a pair of connected virtual devices such that one member of the pair loks (almost) like a real tty port. This allows the I/O of an interactive program (like a shell or editor) to be connected to some filter program (like a remote login demon or a terminal emulator for X windows). Since the slave half of the pseudo-tty looks like a real tty, the shell or editor chugs happily away, thinking it is connected to a terminal. The filter or daemon on the master end can then perform added-value processing without disturbing either the user or the interactive program. [Note: the slave end is only *almost* like a real tty - this is kelling us here, since we have a program that refuses to accept the limited simulation as adequate, it wants the unsupported features. I am rather upset by this, a pty should be a full simulation of a real tty, not a partial one.] >Second, Whais select() used for ? I just found a program called tapserial >that I want to compile and its needs select() which is broken on Xenix 2.3 ... >So I installed the XNX141 SLS to fix it. select() is mechanism for polling multiple I/O ports for availability. It is most useful for a program that wants to read 'simultaneously' from several input lines (such as a daemon). It eliminates the need for an active polling loop using non-blocking I/O by making the kernel do the work. (Note, it is actually a system call, or at least requires system support to work properly, though it can be simulated at a high cost without it). It also has a time-out feature with millisecond resolution, so it is also often used to provide for fractional second sleeps. (By setting the time-out and giving it an empty list of I/O ports to check). It is a Berkeley Unix feature. The System V equivalent (or nearly so) is called poll().