home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.28 / text0027.txt < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.6 KB  |  39 lines

  1. Submitted-by: peter@ferranti.com (Peter da Silva)
  2.  
  3. In article <11ase4INNrh6@ftp.UU.NET> gwyn@smoke.brl.mil (Doug Gwyn) writes:
  4. > I think a better design for the whole "current directory" approach
  5. > is for chdir() to set a "path prefix" for the process (and its
  6. > children) and for getcwd() to retrieve this prefix string.
  7.  
  8. This would mean two programs on the same system could be in the same
  9. directory and getcwd would return different values.
  10.  
  11. A better design still would be to make the current directory a standard
  12. file descriptor, and make the basic call used to implement chdir accept
  13. a file descriptor rather than a file name. That way you could do things
  14. like getcwd() and ftw() cleanly without having to fork a child or risk
  15. getting lost in a maze of twisty little links.
  16.  
  17. I also think argv and envp should be passed in on yet another standard
  18. file descriptor as well... let's simplify the design rather than complicate
  19. it.
  20.  
  21. > With a scheme like that it is trivial to implement "." and ".."
  22. > in user-mode libraries.  I use an operating system like that at
  23. > home and it works fine, with none of the problems we have seen
  24. > mentioned in this thread.
  25.  
  26. What operating system is this?
  27.  
  28. (of course, I use a couple of OSes that work the way I described, and it
  29. still works fine).
  30. -- 
  31. Peter da Silva                                                      `-_-'
  32. L5 Society: gone, but not forgotten...                               'U` 
  33. Ferranti International Controls Corporation                    Have you hugged
  34. Sugar Land, TX  77487-5012    +1 713 274 5180                  your wolf today?
  35.  
  36.  
  37. Volume-Number: Volume 28, Number 26
  38.  
  39.