X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=vswitchd%2Fsystem-stats.c;h=b8f8d7e33036e0956a90cfe5c4bc1f233078c7c1;hb=a9a2fba5098917a7c072a601ecedd8d5bcd83e23;hp=45b8cce64cf002145a427d4d7376e92cdc2f2f18;hpb=d98e60075528c3065ad453f7add4b30f22edcde3;p=openvswitch diff --git a/vswitchd/system-stats.c b/vswitchd/system-stats.c index 45b8cce6..b8f8d7e3 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 @@ -387,9 +386,9 @@ get_process_stats(struct shash *stats) struct dirent *de; DIR *dir; - dir = opendir(ovs_rundir); + dir = opendir(ovs_rundir()); if (!dir) { - VLOG_ERR_ONCE("%s: open failed (%s)", ovs_rundir, strerror(errno)); + VLOG_ERR_ONCE("%s: open failed (%s)", ovs_rundir(), strerror(errno)); return; } @@ -411,10 +410,10 @@ get_process_stats(struct shash *stats) continue; } - file_name = xasprintf("%s/%s", ovs_rundir, de->d_name); + 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; }