This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: ERRORLEVEL not returning to Cygwin shell
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: paul dot hermeneutic at gmail dot com, cygwin at cygwin dot com
- Date: Sat, 12 Oct 2013 00:40:44 +0400
- Subject: Re: ERRORLEVEL not returning to Cygwin shell
- Authentication-results: sourceware.org; auth=none
- References: <CAJ4+4arwV_Tpp3AGu5c4qxxw36oDTqW+s5j1YW5GC32c-_V3eg at mail dot gmail dot com>
- Reply-to: Andrey Repin <cygwin at cygwin dot com>
Greetings, paul.hermeneutic@gmail.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@yandex.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