home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: brnstnd@KRAMDEN.ACF.NYU.EDU (Dan Bernstein)
-
- In article <1991Jul19.033239.8917@uunet.uu.net> Chuck Karish (karish@mindcraft.com) writes:
- > >Anyway, as vendors haven't come to any agreement on this facility---the
- > >current ``standard'' is to install most programs somewhere under
- > >/usr/local, with new subdirectories for big programs like ingres---I
- > >despise POSIX's attempts to name any particular solution a ``standard.''
- > >In the interests of security, efficiency, and backwards compatibility, I
- > >propose /inst/bin as a viable alternative to getconf. I suggest that
- > >POSIX look---and take its time looking---before it leaps.
- > Dan, do you really understand what getconf does? I fail to see
- > how its use (properly protected) can make any program less
- > portable.
-
- My objection is to the idea of standardizing something which vendors
- haven't even begun to look at. I feel the same way about sysconf() and
- pathconf(), POSIX sessions (oh, right, HP-UX already had something like
- this---how dare I argue against such a precedent?), and most of POSIX's
- other inventions.
-
- In this particular case, existing programs can be used with /inst/bin
- without even changing the source code. All you have to do is change the
- default system PATH. Adding getconf to a program means that the program
- will no longer work on the vast majority of systems. That's what I mean
- by unportable.
-
- > A puzzle for the reader (maybe this is obvious to everyone but
- > me): How can a shell script determine whether it's running on
- > a POSIX.2 system? If it calls getconf and getconf does not
- > exist, the shell may exit. It could call getconf in a
- > subshell, but that's ugly and expensive.
-
- Congratulations. You just hit the nail right on the head.
-
- ---Dan
-
- Volume-Number: Volume 24, Number 55
-
-