home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Bug_Fixes / Net.v7bugs / 0033 < prev    next >
Encoding:
Text File  |  1981-10-04  |  1.1 KB  |  27 lines

  1. Autzoo.997
  2. net.v7bugs
  3. utzoo!henry
  4. Thu Oct  1 19:16:21 1981
  5. shell misfeature
  6. The following does not always do what you expect:
  7.  
  8.     PATH=/bin:/usr/bin
  9.     ... something ...
  10.  
  11. Why?  Because except in some situations where all programs involved are
  12. shell files, the offspring will see the original PATH, not "/bin:/usr/bin".
  13. Why so?  Because the change to PATH was not exported!  Of the people
  14. here who have run into this "feature", 100% think that it is both
  15. (a) counterintuitive and (b) wrong.
  16.  
  17. The rule that "no change is exported unless the variable is exported"
  18. is elegant but is bad human engineering, because the "exported" status
  19. of the variable is not passed down to children when the value is passed
  20. down.  Even the shell doesn't consistently follow this rule, witness the
  21. "except" in the first sentence above.  Proposal:  variables inherited
  22. from the environment should be implicitly and automatically marked
  23. "exported".  Does anybody see anything wrong/bad about this?
  24.  
  25. For an example of the trouble, the "PATH=/bin:/usr/bin;" that uuxqt
  26. prepends to every command it runs is not inherited by the command.
  27.