You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aw...@apache.org on 2017/08/01 03:04:25 UTC

hadoop git commit: HADOOP-14343. Wrong pid file name in error message when starting secure daemon

Repository: hadoop
Updated Branches:
  refs/heads/trunk 1a78c0ff0 -> abbf4129a


HADOOP-14343. Wrong pid file name in error message when starting secure daemon

Signed-off-by: Allen Wittenauer <aw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/abbf4129
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/abbf4129
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/abbf4129

Branch: refs/heads/trunk
Commit: abbf4129a24c99fbce6d70b191ec19cf0d17e9be
Parents: 1a78c0f
Author: Andras Bokor <bo...@freemail.hu>
Authored: Mon Jul 31 20:03:43 2017 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Mon Jul 31 20:03:43 2017 -0700

----------------------------------------------------------------------
 .../hadoop-common/src/main/bin/hadoop-functions.sh             | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/abbf4129/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
----------------------------------------------------------------------
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 8ac1b0c..2744643 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
@@ -1873,11 +1873,9 @@ function hadoop_start_secure_daemon_wrapper
     (( counter++ ))
   done
 
-  # this is for the daemon pid creation
   #shellcheck disable=SC2086
-  echo $! > "${jsvcpidfile}" 2>/dev/null
-  if [[ $? -gt 0 ]]; then
-    hadoop_error "ERROR:  Cannot write ${daemonname} pid ${daemonpidfile}."
+  if ! echo $! > "${jsvcpidfile}"; then
+    hadoop_error "ERROR:  Cannot write ${daemonname} pid ${jsvcpidfile}."
   fi
 
   sleep 1


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org