Fw: File name too long problem -- maybe fix coming?

Eric Blake ebb9@byu.net
Wed Jan 9 13:53:00 GMT 2008

According to Corinna Vinschen on 1/9/2008 5:44 AM:
> Actually, for a couple of weeks I'm already wondering if we shouldn't
> better set PATH_MAX to 32000 or even a smaller value like 16384.  That's
> still a darn long path and it's much more safe to handle.

If we follow Linux' lead, then set PATH_MAX to the largest sequence we are 
willing to handle at once (even 4096 would be fine by me) in the arguments 
given to most syscalls, provided that we also support the ability to 
access files with longer names by using relative paths that fit within 
PATH_MAX (for example, with the addition of *at functions).  Then only a 
few special functions will have to support strings longer than PATH_MAX 
(for example, the Austin Group is adding requirements to getcwd in the 
next revision of POSIX that makes it always accurate, even if the current 
directory has an absolute path longer than PATH_MAX, because it was 
reached in stages through relative directories).

I heartily agree that setting PATH_MAX to 32000 is overkill, provided that 
we can still get to a file with a name that long by breaking the access 
into stages.

Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net

More information about the Cygwin-developers mailing list