Is Unix getting bloated with un-needed special cases?
Spannring
icsu7039 at attila.cs.montana.edu
Tue Apr 30 02:24:26 AEST 1991
A few years back I purchased a book called "Programming in the
Unix Environment" by Kernighan and Pike. After reading this book
I was impressed how everything in Unix is just a file. In fact, they
showed how even a directory is just another file. There was an example
using the od command to look at the actual contents of the current
working directory. Then they wrote some nifty C functions to take
an incorrectly spelled file name and make a guess as to what the user
really meant.
Times have changed. I tried using od to look at my current directory
on an Ultrix box. No dice. So I wrote a little program using only
low-level system calls. No dice. f = open(".", ORDONLY) worked
fine, but read(f, buf, 1) failed with errno equal to 21 (EISDIR).
It seems to me that Unix used to be a nice little OS without
special cases. Not any more. Since handling special cases
will slow the system down, why do it? Comments? Explanations?
--
====================================================================
Six of one, 110 (base 2) of | Craig Spannring
another. | icsu7039 at caesar.cs.montana.edu
----------------------------------+--------------------------------
More information about the Comp.unix.programmer
mailing list