home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v21 / 079 / text0000.txt < prev   
Encoding:
Internet Message Format  |  1990-12-05  |  1.3 KB

  1. From:  Donn Terry <donn@hpfcdc.uucp>
  2.  
  3. >IEEE Std 1003.1-1988 paragraph 5.7.1.2 note 5 describes the value 
  4. >returned by pathconf() when _PC_PATH_MAX is used as an argument as, 
  5. >"The maximum length of a relative pathname when the specified 
  6. >directory is the working directory."
  7.  
  8. >I have tried this on several POSIX.1 systems.  None of them seem to 
  9. >enforce the maximum.  In fact they all return a constant (say, 1024) 
  10. >even if the path given to pathconf() is already longer than that.
  11.  
  12. >Is this conforming behavior?
  13.  
  14. >If it is conforming, how should a portable application determine the 
  15. >longest pathname a user can specify?  
  16.  
  17. This is hard to get a clear reading on from what you have written.  It
  18. could either be sloppy implementation or perfectly conformant.
  19.  
  20. POSIX specifically permits (in shell notation):
  21.     cd /
  22.     cd <1024 character pathname>
  23.     cd <another such thing>
  24.     ...
  25.  
  26. There is no longest pathname a user can specify; there is a longest
  27. one from / and from the current working directory.  Pathconf doesn't
  28. worry about what the cwd is.
  29.  
  30. >What about _PC_NAME_MAX?  May readdir() return a longer name than the 
  31. >value returned by pathconf() for that directory?
  32.  
  33. It shouldn't.  No location relative issues here.
  34.  
  35. Donn Terry
  36. (As usual... speaking only for myself.)
  37.  
  38. Volume-Number: Volume 21, Number 79
  39.  
  40.