home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / std_unix / v21 / 079 < prev    next >
Internet Message Format  |  1990-12-05  |  2KB

  1. From std-unix-request@uunet.uu.net  Sat Sep  1 20:19:03 1990
  2. Received: from cs.utexas.edu by uunet.uu.net (5.61/1.14) with SMTP 
  3.     id AA12145; Sat, 1 Sep 90 20:19:03 -0400
  4. Posted-Date: 31 Aug 90 23:44:44 GMT
  5. Received: by cs.utexas.edu (5.64/1.76) 
  6. From: hpfcdc!donn@cs.utexas.edu (Donn Terry)
  7. Newsgroups: comp.std.unix
  8. Subject: Re: Meaning of _PC_PATH_MAX
  9. Message-Id: <482@usenix.ORG>
  10. References: <465@usenix.ORG>
  11. Sender: std-unix@usenix.ORG
  12. X-Submissions: std-unix@uunet.uu.net
  13. Date: 31 Aug 90 23:44:44 GMT
  14. Reply-To: std-unix@uunet.uu.net
  15. To: std-unix@uunet.uu.net
  16.  
  17. From:  Donn Terry <donn@hpfcdc.uucp>
  18.  
  19. >IEEE Std 1003.1-1988 paragraph 5.7.1.2 note 5 describes the value 
  20. >returned by pathconf() when _PC_PATH_MAX is used as an argument as, 
  21. >"The maximum length of a relative pathname when the specified 
  22. >directory is the working directory."
  23.  
  24. >I have tried this on several POSIX.1 systems.  None of them seem to 
  25. >enforce the maximum.  In fact they all return a constant (say, 1024) 
  26. >even if the path given to pathconf() is already longer than that.
  27.  
  28. >Is this conforming behavior?
  29.  
  30. >If it is conforming, how should a portable application determine the 
  31. >longest pathname a user can specify?  
  32.  
  33. This is hard to get a clear reading on from what you have written.  It
  34. could either be sloppy implementation or perfectly conformant.
  35.  
  36. POSIX specifically permits (in shell notation):
  37.     cd /
  38.     cd <1024 character pathname>
  39.     cd <another such thing>
  40.     ...
  41.  
  42. There is no longest pathname a user can specify; there is a longest
  43. one from / and from the current working directory.  Pathconf doesn't
  44. worry about what the cwd is.
  45.  
  46. >What about _PC_NAME_MAX?  May readdir() return a longer name than the 
  47. >value returned by pathconf() for that directory?
  48.  
  49. It shouldn't.  No location relative issues here.
  50.  
  51. Donn Terry
  52. (As usual... speaking only for myself.)
  53.  
  54. Volume-Number: Volume 21, Number 79
  55.  
  56.