X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=AzMp/ismhxxtw+6b uwyDZaoM77xv2YYgad8MobmJPpJzUxCwd7ICOL6Iii4t8VU9Lqw8bP0l9Gi14blY ED3p67/iIfw1lM7JuliEiNiIBwpDCLcYRbb2FHw28YEk+DuelnCOyyi+J9m12pwu wlGGpFfZu0C8YWN6hHx7gE76YNA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=cUGy3eGsCMOGRCAZ3Z6Uya 7H/r0=; b=lxicoxtvmSn3i/YtNAB7IxjUnT62rsiv3bYmeKGLRZZTqinSLmi1dh GrXU9u5jP4xPZe+L/Ra1/ClF5glS7I/JFmCBINiNrBkUvk/DMTElheB8MmG4Fhys 0EQ7upn7EuTukjyCO/Y1v/iY4gFu9C0uJsQl9x3iJ4ZXyapTsSePA= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.9 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Date: Sat, 12 Oct 2013 00:40:44 +0400 From: Andrey Repin Reply-To: Andrey Repin Message-ID: <1275372499.20131012004044@mtu-net.ru> To: paul DOT hermeneutic AT gmail DOT com, cygwin AT cygwin DOT com Subject: Re: ERRORLEVEL not returning to Cygwin shell In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Greetings, paul DOT hermeneutic AT gmail DOT com! > I am using CYGWIN_NT-5.1 PAC047922 1.7.25(0.270/5/3) 2013-08-31 20:39 > i686 Cygwin > An exit code returned by a DOS batch file does not seem to be coming > back to the Cygwin shell. I am using bash. > $ cat myexit.bat > @echo off > set EXITCODE=%1 > echo got here with %1 > exit /b %EXITCODE% > $ cmd /c c:/DOCUME~1/pwatson/bin/myexit.bat 8 > got here with 8 > $ echo $? > 0 Carry this case to appropriate forums. [C:\]$ cat test.bat cmd.exe /C C:\testcase.bat echo %ERRORLEVEL% [C:\]$ cat testcase.bat @exit /B 8 [C:\]$ test.bat 0 [C:\]$ -- WBR, Andrey Repin (anrdaemon AT yandex DOT ru) 12.10.2013, <00:39> 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