CWD and long paths

Pierre A. Humblet Pierre.Humblet@ieee.org
Wed Oct 17 01:28:00 GMT 2007


At 05:25 PM 10/13/2007, Lev Bishop wrote:
>On 10/13/07, Corinna Vinschen wrote:
> > On Oct 13 13:03, Corinna Vinschen wrote:
> > > So, for now we have four options(*)what to do in exec(3) when trying to
> > > start a native child process from a long CWD (> MAX_PATH):
> > >
> > > 1. Return ENAMETOOLONG and don't start the native child.
> > >
> > > 2. CWD for the native child is set to $SYSTEMROOT.
> > >
> > > 3. CWD is set to the root of the current drive (either X:\ or
> > >    \\server\share).
> > >
> > > 4. CWD is set to the longest leading path component of CWD which still
> > >    fits into MAX_PATH.
> >
> > I forgot the fifth option, suggested by Pierre:
> >
> > 5. Start the native app in the last CWD we were in which was < MAX_PATH.
> >
> > > As an additional possible feature, regardless of which of the above
> > > options we choose:
> > >
> > > - Print a longish message along the lines of what's printed by CMD.
>
>I have another idea. Don't know how well it would work, but something
>to consider. How about:
>
>6. Set current directory to "C:\obviouslynonexistantpath".



Sorry for the late vote. My proposal was to do whatever we do for 
virtual directories such as /proc,
not necessarily 5. I still think it's the right thing.
One can execute Windows programs from /proc, this has never generated 
complaints.
Users seem to act responsibly in this matter :)
So 3.

Pierre






More information about the Cygwin-developers mailing list