Suppress anoying Terminate batch job prompt when hitting CTRL+C. Note however that...
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 12 Mar 2010 11:38:43 +0000 (11:38 +0000)
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 12 Mar 2010 11:38:43 +0000 (11:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@922223 13f79535-47bb-0310-9956-ffa450edef68

bin/catalina.bat

index 484e8d9..5e73253 100755 (executable)
@@ -78,6 +78,17 @@ rem
 rem $Id$
 rem ---------------------------------------------------------------------------
 
+rem Suppress Terminate batch job on CTRL+C
+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
+:mainEntry
+del /Q "%~dp0run" >NUL 2>&1
+
 rem Guess CATALINA_HOME if not defined
 set "CURRENT_DIR=%cd%"
 if not "%CATALINA_HOME%" == "" goto gotHome