summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-07-05 12:57:16 -0700
committerBen Pfaff <blp@nicira.com>2012-07-05 13:03:25 -0700
commitf972f3b48770fcd2228372f243ed51647491001e (patch)
tree978e6479898a1191898738194403920ea1518b60
parent33790719a8617b77848e9a222d9f154547f19931 (diff)
downloadopenvswitch-f972f3b48770fcd2228372f243ed51647491001e.tar.gz
ovs-check-dead-ifs: Tolerate processes that disappear during run.
os.listdir("/proc/%d/fd" % pid) throws OSError if 'pid' died since the list of pids was obtained. Bug #12375. Reported-by: Amey Bhide <abhide@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
-rw-r--r--AUTHORS1
-rwxr-xr-xutilities/ovs-check-dead-ifs.in7
2 files changed, 7 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 957bfce3b..43c1fd0f8 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -77,6 +77,7 @@ Alan Shieh ashieh@nicira.com
Alban Browaeys prahal@yahoo.com
Alex Yip alex@nicira.com
Alexey I. Froloff raorn@altlinux.org
+Amey Bhide abhide@nicira.com
André Ruß andre.russ@hybris.com
Andreas Beckmann debian@abeckmann.de
Atzm Watanabe atzm@stratosphere.co.jp
diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in
index 53185d660..9b806ed31 100755
--- a/utilities/ovs-check-dead-ifs.in
+++ b/utilities/ovs-check-dead-ifs.in
@@ -62,7 +62,12 @@ for pid in os.listdir("/proc"):
except ValueError:
continue
- for fd in os.listdir("/proc/%d/fd" % pid):
+ try:
+ fds = os.listdir("/proc/%d/fd" % pid)
+ except OSError:
+ continue
+
+ for fd in fds:
try:
fd = int(fd)
except ValueError: