X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=utilities%2Fovs-check-dead-ifs.in;h=ac54f6c9ceba915d9e75200f624ca70118f3b348;hb=5de43a606c949dbb74272d5b09627ddd5f64b06b;hp=53185d6600241902f9ca6fbb1d03ffc9388dbc4e;hpb=2dc7590de5e0adae1e332ff84c0c8af264f403b9;p=sliver-openvswitch.git diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in index 53185d660..ac54f6c9c 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: @@ -93,4 +98,5 @@ if bad_pids: print """ The following processes are listening for packets to arrive on network devices that no longer exist. You may want to restart them.""" + sys.stdout.flush() os.execvp("ps", ["ps"] + ["%s" % pid for pid in bad_pids])