Avoid overhead of another process (env) in startShell()

This commit is contained in:
Bob Lantz
2014-07-01 01:49:10 -07:00
parent 549f1ebc8f
commit 82e0e9f38f
+3 -2
View File
@@ -124,8 +124,9 @@ class Node( object ):
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