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
This commit is contained in:
Eric Evans 2010-05-21 16:10:11 +00:00
parent 261885ea2a
commit d0f2a780a0
1 changed files with 1 additions and 1 deletions

View File

@ -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 <&- &