elasticsearch/elasticsearch — Issue #1745: wrong exit value in startup script
Author: tvburger
Created: 2012-02-29 09:37:58+00:00
State: open

The startup script returns 1 when started with no "-p" option.

"
else
exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -cp $ES_CLASSPATH $props \
org.elasticsearch.bootstrap.ElasticSearch <&- &

[ ! -z "$pidpath" ] && printf '%d' $! > "$pidpath"
fi

return $?
"

The return value of exec should be stored. Then checked.
Only then optional writing of the pid should be done.

- Tom