This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bash silently truncates the Command Line when called programatically via CreateProcess as MAXPATHLEN was reduced to 8192 from 16384
- From: "Houder" <houder at xs4all dot nl>
- To: cygwin at cygwin dot com
- Date: Wed, 28 May 2014 17:41:19 +0200
- Subject: Re: Bash silently truncates the Command Line when called programatically via CreateProcess as MAXPATHLEN was reduced to 8192 from 16384
- Authentication-results: sourceware.org; auth=none
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