From 8da7ca8760cb84e8e8b443976d1b26391eab1873 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Sun, 13 Mar 2011 00:01:53 -0800 Subject: 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 --- vswitchd/system-stats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vswitchd/system-stats.c') 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 #endif -#include #include #include #include @@ -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; } -- cgit v1.2.1