From owner-freebsd-current@FreeBSD.ORG Mon Jan 30 11:50:21 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9593B16A420 for ; Mon, 30 Jan 2006 11:50:21 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4329F43D45 for ; Mon, 30 Jan 2006 11:50:21 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 52F4446BA8; Mon, 30 Jan 2006 06:50:13 -0500 (EST) Date: Mon, 30 Jan 2006 11:52:05 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Stephen McKay In-Reply-To: <200601301102.k0UB2L0q006713@dungeon.home> Message-ID: <20060130115009.B95776@fledge.watson.org> References: <20060126022854.GA16323@ci0.org> <20060126020818.K97024@fledge.watson.org> <200601281231.k0SCVhtc011525@dungeon.home> <20060128215112.W95776@fledge.watson.org> <200601301102.k0UB2L0q006713@dungeon.home> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: current@freebsd.org Subject: Re: HEADS UP: pts code committed X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2006 11:50:21 -0000 On Mon, 30 Jan 2006, Stephen McKay wrote: > On Saturday, 28th January 2006, Robert Watson wrote: > >> You are right, that is what it does. This is actually an intentional design >> choice to match the behavior in Solaris, which also names them /dev/ptyp*. >> Well, strictly speaking, those are just symlinks into /devices, but it comes >> to much the same thing. You are probably right, though -- naming them >> /dev/pty/* would make more sense, and won't affect the libc API. > > I had a quick look on a Solaris 8 machine and found only legacy pty devices > in /dev. In /devices, they lump pts and pty nodes into /devices/pseudo with > a lot of other stuff. Very messy. So I don't think the new FreeBSD > /dev/ptynnn behaviour is the same as Solaris after all. I checked a Fedora > Core 4 box too, and it doesn't put the pty's in /dev at all. At least in > all implementations the important part (/dev/pts/nnn) is the same. > > Anyway, I can't find anything that depends on the naming for the master and > it would make /dev tidier to bury pty's in a subdirectory. Shall we add > that one missing '/'? The code would then match the comments. :-) Yes, we shuold -- I'll commit that today. > Alternatively, the other implementations seem to get by without putting them > in the tree at all. Do we need them? It has to do with a difference in how our devfs does device cloning -- whereas on some systems, your file descriptor reference to a device is silently replaced with the cloned device, so no name for it is needed, our implementation actually hooks the lookup to instantiate the device. It probably would be possible to allow a name never to be instantiated with this model, but it's not currently that way. Robert N M Watson