From 98a8231cef0e94eb7cc1f6c43dd5224db379d550 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Fri, 23 Jan 2015 16:43:49 -0800 Subject: [PATCH] Exit poll loop on POLLHUP or anything unexpected In my opinion, we really shouldn't even get POLLHUP, but we do. In case we get anything else odd, quite polling on that fd. --- mininet/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mininet/util.py b/mininet/util.py index 4b6e628..a655f7d 100644 --- a/mininet/util.py +++ b/mininet/util.py @@ -105,7 +105,7 @@ def errRun( *cmd, **kwargs ): err += data if data == '': errDone = True - elif event & POLLHUP: + else: # POLLHUP or something unexpected if f == popen.stdout: outDone = True elif f == popen.stderr: