From 47acf5397442f999dbbd26e81075139f508edc11 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Wed, 24 Mar 2010 17:02:44 -0700 Subject: [PATCH] Change to use printf rather than echo. --- mininet/node.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mininet/node.py b/mininet/node.py index e2a23ac..7c7b4b3 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -70,8 +70,7 @@ class Node( object ): self.inNamespace = inNamespace if self.inNamespace: opts += '-n' - # xpg_echo is needed so we can echo our sentinel in sendCmd - cmd = [ 'mnexec', opts, 'bash', '-O', 'xpg_echo', '-m' ] + cmd = [ 'mnexec', opts, 'bash', '-m' ] self.shell = Popen( cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=False ) self.stdin = self.shell.stdin @@ -168,7 +167,7 @@ class Node( object ): separator = ';' if printPid and not isShellBuiltin( cmd ): cmd = 'mnexec -p ' + cmd - self.write( cmd + separator + ' echo -n "\\0177" \n' ) + self.write( cmd + separator + ' printf "\\177" \n' ) self.lastCmd = cmd self.lastPid = None self.waiting = True