From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9656 invoked by alias); 14 Feb 2014 15:23:53 -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 9641 invoked by uid 89); 14 Feb 2014 15:23:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,WEIRD_QUOTING autolearn=ham version=3.3.2 X-HELO: mho-02-ewr.mailhop.org Received: from mho-02-ewr.mailhop.org (HELO mho-02-ewr.mailhop.org) (204.13.248.72) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 14 Feb 2014 15:23:50 +0000 Received: from pool-173-76-49-34.bstnma.fios.verizon.net ([173.76.49.34] helo=cgf.cx) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1WEKcF-000BPZ-RC for cygwin@cygwin.com; Fri, 14 Feb 2014 15:23:47 +0000 Received: from ednor (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with SMTP id D10A560108 for ; Fri, 14 Feb 2014 10:23:44 -0500 (EST) Received: by ednor (sSMTP sendmail emulation); Fri, 14 Feb 2014 10:23:44 -0500 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+Ite1UbjNfnekWh3Kx0ihF Date: Fri, 14 Feb 2014 15:28:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: batch script execution failing with 255 exit code in cygwin 1.7.28 Message-ID: <20140214152344.GA1191@ednor.casa.cgf.cx> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2014-02/txt/msg00366.txt.bz2 On Fri, Feb 14, 2014 at 12:10:00PM +0530, Prakash Babu wrote: >Hi , > > >I use Cygwin to execute batch scripts on remote windows hosts using ssh. > >The batch script execution started failing with the latest cygwin >version 1.7.28. > >The exit code thrown is 255 and batch script is not able to process >the command line arguments. > >When I try to print the command line argument(%1) its printing both >the argument name and value. > >This was working fine with Cygwin 1.7.27 and looks to be regression in 1.7.28 > > >eg. Batch script (test.bat) >@echo off >:setArgs >if ""%1""=="""" goto doneSetArgs >set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 >echo %1=== >echo %2=== >shift >shift >goto setArgs >:doneSetArgs > > >Cygwin.1.7.27 the output of the script would be >#./test.bat OS=Win >OS=== >Win=== > >Cygwin.1.7.28 the output of the script is >#./test.bat OS=Win >"OS=Win"=== >=== Yep. At a user's request we now force a " around parameters which are passed to Windows programs like we do for parameters with spaces. cgf -- 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