This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: 1.3.15 on W2K: return codes, bash, cmd.exe
- From: Stephen Powell <stephen_powell at optusnet dot com dot au>
- To: cygwin at cygwin dot com
- Date: Fri, 06 Dec 2002 13:52:53 +1100
- Subject: Re: 1.3.15 on W2K: return codes, bash, cmd.exe
- Cancel-lock: sha1:vKgHGwtbcc1Eh8s9mob6kFZAVqE=
- Organization: Hail Eris!
- References: <20021205004220.5AA041D3D@dragaera.ReleaseDominatrix.com>
On Wed, 04 Dec 2002, angela@dragaera.releasedominatrix.com wrote:
[...]
> The .bat scripts do some minimal error checking and exit with
> "exit /b 1" on error.
Try it without the /b, just "exit 1".
With /b:
$ cat a.bat
exit /b 2
$ cmd /c a.bat ; echo rc=$?
C:\winnt\temp>exit /b 2
rc=0
Without /b:
$ cat b.bat
exit 2
$ cmd /c b.bat ; echo rc=$?
C:\winnt\temp>exit 2
rc=2
$ cmd /ver
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
--
Stephen Powell
stephen_powell@optusnet.com.au
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/