home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.24 / text0054.txt < prev    next >
Encoding:
Text File  |  1991-09-03  |  1.8 KB  |  39 lines

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