diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh index e38d678e020..7a0a9b802a9 100755 --- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh @@ -1768,7 +1768,7 @@ function hadoop_java_exec export CLASSPATH #shellcheck disable=SC2086 - exec "${JAVA}" "-Dproc_${command}" ${HADOOP_OPTS} "${class}" "$@" + eval exec '"${JAVA}"' '"-Dproc_${command}"' ${HADOOP_OPTS} '"${class}"' '"$@"' } ## @description Start a non-privileged daemon in the foreground. @@ -1805,7 +1805,7 @@ function hadoop_start_daemon export CLASSPATH #shellcheck disable=SC2086 - exec "${JAVA}" "-Dproc_${command}" ${HADOOP_OPTS} "${class}" "$@" + eval exec '"${JAVA}"' '"-Dproc_${command}"' ${HADOOP_OPTS} '"${class}"' '"$@"' } ## @description Start a non-privileged daemon in the background.