[EXTERNAL] Re: Strange behavior when executing programs
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Dec 12 15:50:42 GMT 2022
On Dec 12 16:42, Corinna Vinschen via Cygwin wrote:
> On Dec 12 15:29, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote:
> > > The problem is that resolved paths may become longer than MAX_PATH.
> >
> > Oh... But that'd be the same on any other OS that exceeds MAX_PATH, symlinking is going to help work around that,
> > if the full path resolution was requested.
> >
> > BTW, about MAX_PATH -- was it Cygwin's or Windows'? If the former, can't it be enlarged?
>
> Cygwin handles up to 32K paths for a long time, just like the Windows
> kernel.
>
> It's the native tools and the Win32 ANSI file-API still using MAX_PATH
> as a path length restriction.
Oh, and for kicks:
Windows only allows MAX_PATH - 2 chars as the maximum path length of the
current working directory. And that's a hard restriction you can't even
workaround by using the UNICODE file-API.
Windows 10 1607 lifts that restriction, but it's boarded up as an opt-in
option. Therefore, as a developer, you can't rely on the user machines
having this enabled, so you're kind of stuck.
Cygwin's CWD doesn't have that restriction, it can be up to 32K long
as well because it handles this internally.
Corinna
More information about the Cygwin
mailing list