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

  1. Submitted-by: djm@eng.umd.edu (David J. MacKenzie)
  2.  
  3. > The function getcwd() is in most cases a passive function, except
  4. > in one (and perhaps others): SunOS 4.1.1.
  5.  
  6. > This system, as indicated in the man pages clearly states that
  7. > getcwd simply makes a system("pwd") to get the result.
  8.  
  9. Sun merely picked it up from SVR3, which does the same thing.
  10. Actually, I bet it uses popen, but regardless, it does spawn a shell.
  11. What an obscene implementation!  I use Doug Gwyn's PD version when I
  12. compile things; it doesn't start any extra processes or mess with signals.
  13. On BSD-like systems, such as Suns, I usually use getwd instead of getwd.
  14. That also doesn't start any processes.
  15.  
  16. > Maybe it would be worth to add description about how the signals should
  17. > behave when calling standardized functions. I checked the draft against
  18. > any particular information on this, but it does not specify that
  19. > getcwd() should not alter signals.
  20.  
  21. Maybe they didn't mention it on purpose, to allow the existing SVR3/SunOS
  22. implementation to conform.  POSIX often makes concessions to existing
  23. practice by leaving things vague or unspecified.  (This is one way
  24. that it sometimes handles historical SysV/BSD differences.)
  25.  
  26.  
  27. Volume-Number: Volume 28, Number 11
  28.  
  29.