Re: ptsname() support (new ptys)

C. Scott Ananian (cananian@lcs.mit.edu)
Thu, 15 Jan 1998 03:32:05 -0500 (EST)


On Thu, 15 Jan 1998, H. Peter Anvin wrote:

> > The permissions are done for free when you use devfs in conjunction with
> > the patch. I think that's the "right" solution to this problem (the
> > kernel has no business creating files).
>
> Sure it does... it does so all the time.

OK, now I'm going to admit my kernel ignorance. Which files does it
create? Sure, it will create files on open() system calls, or whatnot, but
you seem to be advocating the automatic creation of "magic" files in
/dev/pts/blah. I don't think any other portion of the kernel requires
there to be a /dev directory, much less a given directory structure and
pty device nodes in /dev/pts/.

Admittedly, these questions do have to be settled for ptsname() to work.
It can't just blindly search the entire filesystem, starting at root, for
the proper device node. But I think this is better handled in user-space,
in glibc, which presumably would have a fixed set of places to search (in
particular I'm thinking /dev/ptyXX and /dev/pts/XX).

> Personally, I think devfs is
> a solution in search of a problem, and one that is fundamentally a
> lose. It's a fix for things that much better done in user space.

Well, I don't want to turn this into a religious war. I'm obviously a
devfs advocate, and have helped to code parts of it, tty support in
particular.
--Scott
@ @
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-oOO-(_)-OOo-=-=-=-=-=
C. Scott Ananian: cananian@lcs.mit.edu / Declare the Truth boldly and
Laboratory for Computer Science/Crypto / without hindrance.
Massachusetts Institute of Technology /META-PARRESIAS AKOLUTOS:Acts 28:31
-.-. .-.. .. ..-. ..-. --- .-. -.. ... -.-. --- - - .- -. .- -. .. .- -.
PGP key available via finger and from http://www.pdos.lcs.mit.edu/~cananian