From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12061 invoked by alias); 17 Feb 2014 05:50:20 -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 12041 invoked by uid 89); 17 Feb 2014 05:50:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_BL_SPAMCOP_NET,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Received: from smtpback.ht-systems.ru (HELO smtpback.ht-systems.ru) (78.110.50.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 17 Feb 2014 05:50:16 +0000 Received: from [91.78.166.180] (helo=darkdragon.lan) by smtp.ht-systems.ru with esmtpa (Exim 4.80.1) (envelope-from ) id 1WFH5l-0000iE-60; Mon, 17 Feb 2014 09:50:09 +0400 Received: from [192.168.1.10] (HELO localhost) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Mon, 17 Feb 2014 05:47:55 -0000 Date: Mon, 17 Feb 2014 13:14:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <492711937.20140217094755@yandex.ru> To: Prakash Babu , cygwin@cygwin.com Subject: Re: batch script execution failing with 255 exit code in cygwin 1.7.28 In-Reply-To: References: <20140214152344.GA1191@ednor.casa.cgf.cx> <20140217033532.GA2376@ednor.casa.cgf.cx> <20140217035649.GA5507@ednor.casa.cgf.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00450.txt.bz2 Greetings, Prakash Babu! > thanks Christopher. > I found the following archive which introduced this fix > (http://cygwin.com/ml/cygwin-patches/2014-q1/msg00017.html) > I feel this causes an inconsistent behavior when batch scripts are > executed using command interpreter(cmd.exe) and cygwin. > There are some generic batch script we might give to users where some > might execute using cmd.exe and some using cygwin(especially remotely > using ssh) and I would be expecting the same behavior in both places. > Also my existing batch script handles argument a=b in a way where I > obtain 'a' using %1 and 'b' using %2 and this behavior is broken now. I would suggest using bash instead of cmd. Since you are running SSH anyway, you are likely to have bash, too. As powerful CMD is, it's cumbersome to use, and nowhere near as powerful, as POSIX shell, not to mention full power of BASH. -- WBR, Andrey Repin (anrdaemon@yandex.ru) 17.02.2014, <09:44> Sorry for my terrible english... -- 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