Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!mcsun!ukc!dcl-cs!aber-cs!athene!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.unix.internals Subject: Re: Session management Message-ID: Date: 3 Sep 90 17:47:56 GMT References: <6038@muffin.cme.nist.gov> <3954@auspex.auspex.com> <8319:Aug2617:20:3690@kramden.acf.nyu.edu> <105387@convex.convex.com> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 48 In-reply-to: tchrist@convex.COM's message of 27 Aug 90 02:33:22 GMT On 27 Aug 90 02:33:22 GMT, tchrist@convex.COM (Tom Christiansen) said: tchrist> In article <8319:Aug2617:20:3690@kramden.acf.nyu.edu> tchrist> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: brnstnd> The difficulties with locking up tty ports are reflections of brnstnd> two different problems: first, that ptys aren't dynamically brnstnd> allocated in 4BSD; and second, that standard ttys exist at all. brnstnd> Hardwired /dev/tty* should be replaced with raw /dev/modem* and brnstnd> so on; *all* tty use should go through a common interface brnstnd> provided by a pseudo-terminal session manager. This would solve brnstnd> many problems at once. Uhm. The basic problem is actually that you cannot put a line discipline on a pipe so as to make it look like a tty line, otherwise pipes and named pipes would be amply sufficient. Actually (named) pipes that you can push line disciplines on and that can transfer file descriptors (the other great idea to avoid abusing the filesystem namespace too much) already exist, and are called streams. Another way to get around the pipe/socket/tty incompatibility problem is to have protocol converters among the various details of these interfaces, and such things are part of the (unimplemented) design of 4.2BSD, under the name of wrappers. tchrist> I think there is a crying need such a thing because the same tchrist> code gets written again and again to do essentially the same tchrist> thing. I think there is acrying need for something like Accent or MUSS, where all system objects are represented by an anonymous, opaque IPC port, and IPC ports can be freely interchanged one with another. Too bad we don't have that uniform interface under UNIX. tchrist> I would make a daemon server that everyone talked to in order tchrist> to get the session. You could instead put it in the kernel as tchrist> a special "/dev/pty" pseudo-driver that did the allocation for tchrist> you, but I don't see much that having it in the kernel might tchrist> gain you considering the cost. The fashionable thing nowadays would be to implement it as a file system type, or maybe even an NFS filesystem server, both under BSD or System V type systems. I am not too fond of this abuse of the filesystem notion, but such is the trend... -- Piercarlo "Peter" Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk