This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bash silently truncates the Command Line when called programatically via CreateProcess as MAXPATHLEN was reduced to 8192 from 16384


Hi Abhijit,

> Please note, when I am saying the path is getting truncated, its the
> bash that is truncating it. Also, its immaterial how and what is
> getting called. With the latest Cygwin, any program that is compiled
> and linked with the CRT would exhibit this behavior. The truncation
> issue in the CRT is best demonstrated by the following Code couplets
>
> Caller.cpp
> --------------
> [snip]
>
> Callee.cpp
> -------------
> [snip]

Using your code couplets (and modifying them a bit), I did some experimentation, and observed:

 - the first parameter to callee, if quoted, is truncated to 8186 bytes in case the length of
   the argument without quotes, exceeds the aforementioned length.
 - no truncation occurs in case the parameter is not quoted.

As far as I can tell, it is not bash, but the Cygwin supervisor, that does the truncation.

Henri


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]