summaryrefslogtreecommitdiff
path: root/vswitchd/system-stats.c
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2011-03-13 00:01:53 -0800
committerJustin Pettit <jpettit@nicira.com>2011-03-13 11:06:50 -0700
commit8da7ca8760cb84e8e8b443976d1b26391eab1873 (patch)
tree1111a779be1b2f61e686534a3e03240aa365e819 /vswitchd/system-stats.c
parent5059eff3bdd5a8ddd5b9d0559b3d36f2b2ad2a7a (diff)
downloadopenvswitch-8da7ca8760cb84e8e8b443976d1b26391eab1873.tar.gz
system-stats: Don't bother calling kill() after read_pidfile().
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 <aevans@nicira.com>
Diffstat (limited to 'vswitchd/system-stats.c')
-rw-r--r--vswitchd/system-stats.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vswitchd/system-stats.c b/vswitchd/system-stats.c
index 9c5a25c5e..b8f8d7e33 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;
}