better not close the out/error stream from CassandraDaemon
----------------------------------------------------------
Key: CASSANDRA-2489
URL: https://issues.apache.org/jira/browse/CASSANDRA-2489
Project: Cassandra
Issue Type: Improvement
Reporter: Jackson Chung
Priority: Minor
When cassandra is started in the background (-p /tmp/pidfile.pid), the
System.out System.err is closed. That may not be suitable in case where
capturing thread dump via traditional sigquit is preferred (kill -3 <pid> ).
This could be useful especially when jmx collection is failing, or ability to
do some little script to continuously capture thread dump via a script in the
background.
closing System.err could also potentially be swallowing fatal error that
crashing the jvm.
I would suggest make change to the stocked cassandra start script, when the
intends is not running in foreground, (ie running in background) then redirect
the standard output/error to a file, eg: /var/log/cassandra/cassandra.out 2>&1 &
currently i apply a workaround to the script by faking the cassandra-foreground
flag as -Dcassandra-foreground=no since the check is simply look for null:
{code:title=AbstracCassandraDaemon.activate()}
if (System.getProperty("cassandra-foreground") == null)
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira