Github user jodersky commented on a diff in the pull request: https://github.com/apache/spark/pull/15338#discussion_r82866433 --- Diff: sbin/spark-daemon.sh --- @@ -122,6 +123,35 @@ if [ "$SPARK_NICENESS" = "" ]; then export SPARK_NICENESS=0 fi +execute_command() { + command="$@" + if [ "$SPARK_NO_DAEMONIZE" != "" ]; then --- End diff -- this only checks if the variable is non-empty. Setting it to the empty string will not work. E.g. `export SPARK_NO_DAEMONIZE=''` will not satisfy the condition. Something like `if [ -z ${SPARK_NO_DAEMONIZE+set} ];` will also handle the null-case (see [this SO thread](http://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash/3601734#3601734)). Another, more elegant, solution would be to use the `[[ -v SPARK_NO_DAEMONIZE]]`, however that requires at least bash 4.2 and is probably not available on all systems that spark runs on.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org