diff --git a/mininet/node.py b/mininet/node.py index ea0e3693b21254bb53301e80e3da3c8fbe36f693..d977c61f0636b4b6131b4b6c041961c7c9d30028 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -124,8 +124,9 @@ def startShell( self ): opts += 'n' # bash -m: enable job control, i: force interactive # -s: pass $* to shell, and make process easy to find in ps - cmd = [ 'mnexec', opts, 'env', 'PS1=' + chr( 127 ), 'bash', - '--norc', '-mis', 'mininet:' + self.name ] + # prompt is set to sentinel chr( 127 ) + os.environ[ 'PS1' ] = chr( 127 ) + cmd = [ 'mnexec', opts, 'bash', '--norc', '-mis', 'mininet:' + self.name ] # Spawn a shell subprocess in a pseudo-tty, to disable buffering # in the subprocess and insulate it from signals (e.g. SIGINT) # received by the parent