Thread View: comp.std.unix
2 messages
2 total messages
Started by Eric Gisin
Fri, 18 Dec 1992 10:40
pathconf _PC_PATH_MAX
Author: Eric Gisin
Date: Fri, 18 Dec 1992 10:40
Date: Fri, 18 Dec 1992 10:40
14 lines
845 bytes
845 bytes
Submitted-by: eric@mks.com (Eric Gisin)
On a system with a defined, constant value for PATH_MAX,
what would pathconf("/tmp", _PC_PATH_MAX) return?
The books I have, Zlotnick and O'Reilly, say PATH_MAX-4.
The systems I have say PATH_MAX.
Who is right? If it is PATH_MAX-4, how would fpathconf work?
I have not seen a POSIX.1 interpretation on this. Is there one?
Eric Gisin, Mortice Kern Systems.
Volume-Number: Volume 29, Number 82
Re; PATH_MAX
Author: Chuck Karish
Date: Wed, 23 Dec 1992 21:28
Date: Wed, 23 Dec 1992 21:28
36 lines
1729 bytes
1729 bytes
Submitted-by: karish@pangea.Stanford.EDU (Chuck Karish)
In article <1gs9qaINN9rl@ftp.UU.NET> eric@mks.com (Eric Gisin) writes:
>On a system with a defined, constant value for PATH_MAX,
>what would pathconf("/tmp", _PC_PATH_MAX) return?
>The books I have, Zlotnick and O'Reilly, say PATH_MAX-4.
>The systems I have say PATH_MAX.
>Who is right? If it is PATH_MAX-4, how would fpathconf work?
POSIX.1-1990 says, in note (5) to Table 5-2 (5.7.1.3):
If path or fildes refers to a directory, the value
returned is the maximum length of a relative pathname
when the specified directory is the working directory.
However, the description of the values in Table 2-6,
which includes PATH_MAX, (2.8.5) says:
The values in Table 2-6 may be constants within an
implementation or may vary from one pathname to
another.
The implementation described above chooses to have
{PATH_MAX} constant rather than variable according to
the length of the path prefix. This is legitimate.
Another interesting question is whether the fixed value
of PATH_MAX accurately reflects the capabilities of
the filesystem.
--
Chuck Karish karish@mindcraft.com
(415) 323-9000 x117 karish@pangea.stanford.edu
Volume-Number: Volume 29, Number 83
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