From cece39e43963a17080e94217e0c0225217c520ed Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Thu, 10 May 2012 16:32:55 -0700 Subject: [PATCH] Fix poller to only check if stdin and node are readable. Thanks to James Zeng for pointing this out! --- mininet/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mininet/cli.py b/mininet/cli.py index 79e55a4..786cc5c 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -313,14 +313,15 @@ class CLI( Cmd ): nodePoller = poll() nodePoller.register( node.stdout ) bothPoller = poll() - bothPoller.register( self.stdin ) - bothPoller.register( node.stdout ) + bothPoller.register( self.stdin, POLLIN ) + bothPoller.register( node.stdout, POLLIN ) if self.isatty(): # Buffer by character, so that interactive # commands sort of work quietRun( 'stty -icanon min 1' ) while True: try: + print 'waiting for input' bothPoller.poll() # XXX BL: this doesn't quite do what we want. if False and self.inputFile: