Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: segfault with exceedingly long path



On Jan 19, 11:13pm, Simon Ruderich wrote:
}
} So we could do that in small steps, e.g. first chdir(2) to a
} directory < PATH_MAX bytes deep, then from there to the next
} directory < PATH_MAX bytes deep and so on until we get down to
} the real directory.

Yes, but that doesn't even begin to address all the other places
where very long paths become an issue.  Would redirections have to
implcitly chdir along the pathname until they got "close enough"
to pass the path tail to open()?  Can you put a ridiculously long
path into $path or $fpath or $module_path?  $TMPPREFIX?  $ZDOTDIR?
What does [[ -d $longpath ]] do?  zstat $longpath?  ${(A)longpath}?

Can you even do an execve() when $#PWD is longer than PATH_MAX?

I don't think we want to let this can of worms out of Pandora's box,
or we'll be chasing geese until the cows come home to roost.



Messages sorted by: Reverse Date, Date, Thread, Author