Github user nchammas commented on a diff in the pull request: https://github.com/apache/spark/pull/3916#discussion_r26080472 --- Diff: sbin/spark-daemon.sh --- @@ -121,45 +121,63 @@ if [ "$SPARK_NICENESS" = "" ]; then export SPARK_NICENESS=0 fi +run_command() { + mode=$1 + shift -case $option in - - (start|spark-submit) - - mkdir -p "$SPARK_PID_DIR" + mkdir -p "$SPARK_PID_DIR" - if [ -f $pid ]; then - TARGET_ID="$(cat "$pid")" - if [[ $(ps -p "$TARGET_ID" -o args=) =~ $command ]]; then - echo "$command running as process $TARGET_ID. Stop it first." - exit 1 - fi + if [ -f $pid ]; then --- End diff -- ``` if [ -f "$pid" ]; then ```
--- 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