The function read_pidfile() will only return a PID if the process is
still running, so there's no reason to send a signal to check again.

Suggested-by: Andrew Evans <[email protected]>
---
 vswitchd/system-stats.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/vswitchd/system-stats.c b/vswitchd/system-stats.c
index 9c5a25c..b8f8d7e 100644
--- a/vswitchd/system-stats.c
+++ b/vswitchd/system-stats.c
@@ -22,7 +22,6 @@
 #if HAVE_MNTENT_H
 #include <mntent.h>
 #endif
-#include <signal.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -414,7 +413,7 @@ get_process_stats(struct shash *stats)
         file_name = xasprintf("%s/%s", ovs_rundir(), de->d_name);
         pid = read_pidfile(file_name);
         free(file_name);
-        if (pid < 0 || kill(pid, 0)) {
+        if (pid < 0) {
             continue;
         }
 
-- 
1.7.1

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to