From 29c3c8827ea495dac4da8d9262b801831cc8743f Mon Sep 17 00:00:00 2001 From: Jamie White Date: Tue, 2 Dec 2014 12:05:02 -0600 Subject: [PATCH 1/2] Added FORK option to batch files --- bin/storm-config.cmd | 1 + bin/storm.cmd | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/storm-config.cmd b/bin/storm-config.cmd index 9a11c34b798..98c84e9404a 100644 --- a/bin/storm-config.cmd +++ b/bin/storm-config.cmd @@ -16,6 +16,7 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. +set FORK=false set STORM_HOME=%~dp0 for %%i in (%STORM_HOME%.) do ( diff --git a/bin/storm.cmd b/bin/storm.cmd index 0cf6b526abd..9263ee5bb4e 100644 --- a/bin/storm.cmd +++ b/bin/storm.cmd @@ -89,7 +89,11 @@ %JAVA% %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments% ) set path=%PATH%;%STORM_BIN_DIR%;%STORM_SBIN_DIR% - call start /b %JAVA% %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments% + if "%FORK%"=="true" ( + call start /b %JAVA% %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments% + ) else ( + %JAVA% %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments% + ) goto :eof From 758f8cf44f8970dce5e48dc7fd514ca69148ee5b Mon Sep 17 00:00:00 2001 From: Jamie White Date: Tue, 2 Dec 2014 13:59:08 -0600 Subject: [PATCH 2/2] Changed STORM_FORK to behave like STORM_DEBUG If STORM_FORK==false then startup will not be forked. All other values, including undefined, will cause the process to fork like the current behavior. --- bin/storm-config.cmd | 1 - bin/storm.cmd | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/storm-config.cmd b/bin/storm-config.cmd index 98c84e9404a..9a11c34b798 100644 --- a/bin/storm-config.cmd +++ b/bin/storm-config.cmd @@ -16,7 +16,6 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. -set FORK=false set STORM_HOME=%~dp0 for %%i in (%STORM_HOME%.) do ( diff --git a/bin/storm.cmd b/bin/storm.cmd index 9263ee5bb4e..f4628f30dc5 100644 --- a/bin/storm.cmd +++ b/bin/storm.cmd @@ -89,10 +89,10 @@ %JAVA% %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments% ) set path=%PATH%;%STORM_BIN_DIR%;%STORM_SBIN_DIR% - if "%FORK%"=="true" ( - call start /b %JAVA% %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments% - ) else ( + if "%STORM_FORK%"=="false" ( %JAVA% %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments% + ) else ( + call start /b %JAVA% %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments% ) goto :eof