Use real exit value if shutdown via stop
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 12 Mar 2010 12:13:45 +0000 (12:13 +0000)
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 12 Mar 2010 12:13:45 +0000 (12:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@922228 13f79535-47bb-0310-9956-ffa450edef68

bin/catalina.bat

index 5e73253..7b1ab7b 100755 (executable)
@@ -83,9 +83,11 @@ if not ""%1"" == ""run"" goto mainEntry
 if exist "%~dp0run" goto mainEntry
 echo Y >"%~dp0run"
 echo Y >"%~dp0yes"
-call "%~dpnx0" %* <"%~dp0yes"
-rem Not actually needed
-exit /B 1
+call "%~f0" %* <"%~dp0yes"
+rem Use provided errorlevel
+set RETVAL=%ERRORLEVEL%
+del /Q "%~dp0yes" >NUL 2>&1
+exit /B %RETVAL%
 :mainEntry
 del /Q "%~dp0run" >NUL 2>&1