Thread View: comp.std.unix
2 messages
2 total messages
Started by Don_Lewine
Mon, 27 Aug 1990 15:11
Meaning of _PC_PATH_MAX
Author: Don_Lewine
Date: Mon, 27 Aug 1990 15:11
Date: Mon, 27 Aug 1990 15:11
20 lines
1181 bytes
1181 bytes
From: Don_Lewine@dgc.ceo.dg.com IEEE Std 1003.1-1988 paragraph 5.7.1.2 note 5 describes the value returned by pathconf() when _PC_PATH_MAX is used as an argument as, "The maximum length of a relative pathname when the specified directory is the working directory." I have tried this on several POSIX.1 systems. None of them seem to enforce the maximum. In fact they all return a constant (say, 1024) even if the path given to pathconf() is already longer than that. Is this conforming behavior? If it is conforming, how should a portable application determine the longest pathname a user can specify? What about _PC_NAME_MAX? May readdir() return a longer name than the value returned by pathconf() for that directory? Volume-Number: Volume 21, Number 63
Re: Meaning of _PC_PATH_MAX
Author: Donn Terry
Date: Fri, 31 Aug 1990 23:44
Date: Fri, 31 Aug 1990 23:44
38 lines
1794 bytes
1794 bytes
From: Donn Terry <donn@hpfcdc.uucp> >IEEE Std 1003.1-1988 paragraph 5.7.1.2 note 5 describes the value >returned by pathconf() when _PC_PATH_MAX is used as an argument as, >"The maximum length of a relative pathname when the specified >directory is the working directory." >I have tried this on several POSIX.1 systems. None of them seem to >enforce the maximum. In fact they all return a constant (say, 1024) >even if the path given to pathconf() is already longer than that. >Is this conforming behavior? >If it is conforming, how should a portable application determine the >longest pathname a user can specify? This is hard to get a clear reading on from what you have written. It could either be sloppy implementation or perfectly conformant. POSIX specifically permits (in shell notation): cd / cd <1024 character pathname> cd <another such thing> ... There is no longest pathname a user can specify; there is a longest one from / and from the current working directory. Pathconf doesn't worry about what the cwd is. >What about _PC_NAME_MAX? May readdir() return a longer name than the >value returned by pathconf() for that directory? It shouldn't. No location relative issues here. Donn Terry (As usual... speaking only for myself.) Volume-Number: Volume 21, Number 79
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads