From: Justin Pettit Date: Sun, 8 Jul 2012 20:04:27 +0000 (-0700) Subject: ipsec gre: Don't cache bad ovs-monitor-ipsec pid values. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=900f7601a1da5fa19c015e02b3c1a52e14042870;p=openvswitch ipsec gre: Don't cache bad ovs-monitor-ipsec pid values. Commit 2a586a5 (ipsec gre: Do not reread ovs monitor ipsec pidfile in netdev vport so much) attempts to cache the pid of ovs-monitor-ipsec so that it's not re-checked so often. Unfortunately, it also cached error returns, so errors never recover. This commit continues to check for the process's existence after an error. Issue #12399 Reported-by: Paul Ingram Signed-off-by: Justin Pettit --- diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index d2c2672b..836069f7 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -682,7 +682,7 @@ parse_tunnel_config(const char *name, const char *type, if (is_ipsec) { static pid_t pid = 0; - if (pid == 0) { + if (pid <= 0) { char *file_name = xasprintf("%s/%s", ovs_rundir(), "ovs-monitor-ipsec.pid"); pid = read_pidfile(file_name);