From d0f2a780a01cba0852e4d97fc3fe3227bfa288be Mon Sep 17 00:00:00 2001 From: Eric Evans Date: Fri, 21 May 2010 16:10:11 +0000 Subject: [PATCH] start script causes flapping when used with runit When started in the foreground, invoke Cassandra using exec so that it replaces the current shell instead of running it from a sub-shell. Patch by Cliff Moon; reviewed by eevans for CASSANDRA-1114 git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@947053 13f79535-47bb-0310-9956-ffa450edef68 --- bin/cassandra | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cassandra b/bin/cassandra index 7864c33a39..013c5ec663 100755 --- a/bin/cassandra +++ b/bin/cassandra @@ -114,7 +114,7 @@ launch_service() # to close stdout/stderr, but it's up to us not to background. if [ "x$foreground" != "x" ]; then cassandra_parms="$cassandra_parms -Dcassandra-foreground=yes" - $JAVA $JVM_OPTS $cassandra_parms -cp $CLASSPATH $props $class + exec $JAVA $JVM_OPTS $cassandra_parms -cp $CLASSPATH $props $class # Startup CassandraDaemon, background it, and write the pid. else exec $JAVA $JVM_OPTS $cassandra_parms -cp $CLASSPATH $props $class <&- &