From: Chunhe Li <lichu...@huawei.com>

Only check wheather is daemon pid exist is not enough, becasue the pid which 
store in pidfile maybe assign to another process by OS. So it will checking
failed for pid exist, but the starting process which own the pid is not the
ovs daemon.

Signed-off-by: Chunhe Li <lichu...@huawei.com>
Signed-off-by: wuyunfei <wuyun...@huawei.com>
---
 utilities/ovs-lib.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
index 48d0c36..8c1a8b2 100644
--- a/utilities/ovs-lib.in
+++ b/utilities/ovs-lib.in
@@ -244,5 +244,5 @@ daemon_status () {
 
 daemon_is_running () {
     pidfile=$rundir/$1.pid
-    test -e "$pidfile" && pid=`cat "$pidfile"` && pid_exists "$pid"
+    test -e "$pidfile" && pid=`cat "$pidfile"` && pid_exists "$pid" && pidof 
"$1"
 } >/dev/null 2>&1
-- 
1.9.2.0


_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to