home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: peter@ferranti.com (peter da silva)
-
- In article <1992Jan8.233116.25927@uunet.uu.net> brnstnd@KRAMDEN.ACF.NYU.EDU (Dan Bernstein) writes:
- > Peter da Silva writes:
- > > Because the more things you can access via the open() system call, the more
- > > powerful an environemnt you have. For example, older programs become able to
- > > access more data sources and sinks without modification or recompiling.
-
- > No. If you need a kludge to support non-UNIXy programs, use /dev/fd.
-
- You say it's a kludge to support non-UNIXy programs. I say it's a natural
- extension to the existing file system to enhance normal, conventional, UNIX
- programs.
-
- > > For a concrete example, in AmigaDOS this expectation is taken further:
-
- > Fine. If you think that AmigaDOS features are appropriate for POSIX
- > standardization, then implement them in a UNIX system and wait for their
- > obvious advantages to win everyone over.
-
- A lot of them are *copied* from UNIX systems to AmigaDOS, for example the
- (initially third-party, and freeware) PIPE: and RDF: devices.
-
- > > Not very, but it's hard to create one from your ".mailrc" file.
-
- > Hmmm? There are many programs running around (e.g., clientserver) which
- > do the same thing for network connections that the shell (via < and >)
- > does for the filesystem.
-
- I see, and how do you specify them to a program that expects a filename?
-
- > > > also bloating the kernel for something which the vast majority of
- > > > programs will never use.
- > > The challenge is on... let's look though my System III (because it's older
- > > and therefore more "pure") Xenix manual:
- > > accton, awk, bdiff, bfs, chgrp, chmod, chown, cmp, comm, cp, cron, cu, diff,
- > > diff3, ed, finger, join, ln, look, lpq, lpr, mail, make, more (and less),
- > > mv, nohup, pr, rm, sdiff, tee, touch, and uucp (etc).
-
- > bdiff, cmp, comm, diff, diff3, join, look, more, nohup, pr, sdiff, tee,
- > and touch can be written to work with file descriptors under v7.
-
- Yes... at the dual cost of spending time doing it, and reducing their
- utility in conventional shell scripts.
-
- > Under
- > BSD, the syscalls for working with descriptors are more complete, so you
- > can do chgrp, chmod, chown, etc. without explicit filenames. I also
- > wonder what sense it makes to do a chmod on /dev/tcp/uunet.uu.net/ftp---
-
- It makes sense to chmod /dev/tcp, though. Or /../xds13.
-
- As for mv, rm, cp, etcetera... you need to re-invent those tools for each
- new name space you create (and deal with conflicts: is "3" a file name, a
- file descriptor number, or an IP port number?).
-
- > And do you have a system where
- > accton works over the network?
-
- Yes, you can specify a file on a remote machine.
-
- > If so I'm sure crackers love your system.
-
- Not really. Our network, as far as possible, looks like a single computer.
- Permissions are mirrored across it. It's as secure as a single, larger
- machine would be.
-
- > Hardly. Adding new ways to create file descriptors involves thinking up
- > new ways to deal with security. Filesystem security is utterly
- > inappropriate for network connections, for example.
-
- Expand?
-
- > > > Finally, let's consider super-open()'s advantages for users. Certainly
- > > > it'd be nice for a user to be able to type something like, say,
- > > > % cat #13@athena.mit.edu
- > > More like "cat /dev/telnet/athena.mit.edu/13".
-
- > Whatever. The shell can still do it!
-
- The shell can't do it for "cc" or "make".
-
- > > then what do you do when you want to access this from "awk", or create a
- > > (sumbolic) link to it called "/dev/weather"?
- >
- > The pure solution is to have every program keep a file descriptor around
- > for talking to the shell. Then requests for opening files can be
- > shuttled down that descriptor. The problem reduces once again to a small
- > matter of shell programming.
-
- I see. The shell becomes the "super open" with its own address space. And
- you don't get a uniform namespace across applications. You have all the
- disadvantages you've claimed for a "super open", and none of the advantages.
-
- > Less pure solutions involve /dev/fd or perhaps what Convex calls
- > ``watchdogs.'' Both of these are far cleaner mechanisms than
- > super-open(), and since they've at least been considered by the market,
- > they'd be far more appropriate for standardization.
-
- "watchdogs" *are* an implementation of what I'm talking about.
- --
- -- Peter da Silva, Ferranti International Controls Corporation
- -- Sugar Land, TX 77487-5012; +1 713 274 5180
- -- "Have you hugged your wolf today?"
- -- grep -il 'sig.*virus' $*|xargs sed -n '/^-- /,$p'|post -n alt.fan.warlord
-
-
- Volume-Number: Volume 26, Number 77
-
-