Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!VAX1.CC.UAKRON.EDU!mcs.kent.edu!usenet.ins.cwru.edu!ukma!wuarchive!cs.utexas.edu!jsq From: addw@phcomp.co.uk (Alain Williams) Newsgroups: comp.std.unix Subject: File system name space Message-ID: <14014@cs.utexas.edu> Date: 25 Oct 90 10:48:45 GMT References: <13878@cs.utexas.edu> Sender: jsq@cs.utexas.edu Organization: Parliament Hill Computers Ltd Lines: 27 Approved: jsq@cs.utexas.edu (Moderator, John S. Quarterman) X-Submissions: std-unix@uunet.uu.net Submitted-by: addw@phcomp.co.uk (Alain Williams) > Anyway, since we're discussing what is and isn't in the POSIX name space, > I'd like to put in a plug for the /dev/fd directory. Opening /dev/fd/7 is > equivalent to doing a dup(7); it is a generalization of the "treat '-' as What happens if you do an ``ls -l'' on /dev/fd, do you see the fds which are open to the ls program or all possible fds, even those which aren't opened ? > (In fact, in V8 - V10, /dev/stdin, /dev/stdout, /dev/stderr, and /dev/tty are > links to /dev/fd/0, /dev/fd/1, /dev/fd/2, and /dev/fd/3, respectively. The > last, in particular, is a nice generalization, and eliminates an ugly special > case in the kernel; init just does one more dup.) I always thought that /dev/tty was a means of getting hold of the tty when you couldn't be certain that 0,1,2 was connected to it. What you are really saying is that the UNIX convention of 0,1,2 having ``pre defined uses'' be extended to `3 always connected to the terminal and used for nothing else'. It isn't a /dev/fd issue, it is a UNIX convention issue. The other thing is the /dev/tty is a guaranteed way of getting the terminal & not something else (that is why the passwd program uses /dev/tty). Alain Williams +44 734 461232 phLOGIN our Turnkey Security Login utility is available NOW - ask me for info. Volume-Number: Volume 22, Number 5