From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21811 invoked by alias); 28 May 2014 15:41:25 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 21797 invoked by uid 89); 28 May 2014 15:41:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp-vbr14.xs4all.nl Received: from smtp-vbr14.xs4all.nl (HELO smtp-vbr14.xs4all.nl) (194.109.24.34) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 28 May 2014 15:41:23 +0000 Received: from webmail.xs4all.nl (dovemail18.xs4all.nl [194.109.26.20]) by smtp-vbr14.xs4all.nl (8.13.8/8.13.8) with ESMTP id s4SFfJUY045514 for ; Wed, 28 May 2014 17:41:19 +0200 (CEST) (envelope-from houder@xs4all.nl) Received: from 83.163.110.75 (SquirrelMail authenticated user incog) by webmail.xs4all.nl with HTTP; Wed, 28 May 2014 17:41:19 +0200 Message-ID: <148f67d907d379af19ab91c030b65403.squirrel@webmail.xs4all.nl> Date: Wed, 28 May 2014 16:07:00 -0000 Subject: Re: Bash silently truncates the Command Line when called programatically via CreateProcess as MAXPATHLEN was reduced to 8192 from 16384 From: "Houder" To: cygwin@cygwin.com User-Agent: SquirrelMail/1.4.18 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2014-05/txt/msg00491.txt.bz2 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