Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master 6f8269606 -> 94253ffdc


JIRA MINIFI-124.  -The active_pid() function kill -s 0 <PID> returns 0 on 
success (PID is currently running), yet the if statement in stop case statement 
is checking for 0 as a failure condition.

This closes #21.

Signed-off-by: Aldrin Piri <ald...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/94253ffd
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/94253ffd
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/94253ffd

Branch: refs/heads/master
Commit: 94253ffdc2d86ffa7d81d1d899eb3d2bc9142891
Parents: 6f82696
Author: codingogre <github....@jmsh.us>
Authored: Thu Oct 20 13:39:18 2016 +0000
Committer: Aldrin Piri <ald...@apache.org>
Committed: Mon Oct 24 13:55:46 2016 -0400

----------------------------------------------------------------------
 bin/minifi.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/94253ffd/bin/minifi.sh
----------------------------------------------------------------------
diff --git a/bin/minifi.sh b/bin/minifi.sh
index ef772e6..dca94f3 100755
--- a/bin/minifi.sh
+++ b/bin/minifi.sh
@@ -174,7 +174,7 @@ case "\$1" in
       echo Starting MiNiFi with PID \${pid} and pid file \${pid_file}
       ;;
     stop)
-      if [ \$(active_pid \${saved_pid}) -le 0 ]; then
+      if [ \$(active_pid \${saved_pid}) -ne 0 ]; then
         echo "MiNiFi is not currently running."
       else
         echo "Stopping MiNiFi (PID: \${saved_pid})."
@@ -274,7 +274,7 @@ case "$1" in
       echo Starting MiNiFi with PID ${pid} and pid file ${pid_file}
       ;;
     stop)
-      if [ $(active_pid ${saved_pid}) -le 0 ]; then
+      if [ $(active_pid ${saved_pid}) -ne 0 ]; then
         echo "MiNiFi is not currently running."
       else
         echo "Stopping MiNiFi (PID: ${saved_pid})."

Reply via email to