Avoid overhead of another process (env) in startShell()
This commit is contained in:
+3
-2
@@ -124,8 +124,9 @@ class Node( object ):
|
|||||||
opts += 'n'
|
opts += 'n'
|
||||||
# bash -m: enable job control, i: force interactive
|
# bash -m: enable job control, i: force interactive
|
||||||
# -s: pass $* to shell, and make process easy to find in ps
|
# -s: pass $* to shell, and make process easy to find in ps
|
||||||
cmd = [ 'mnexec', opts, 'env', 'PS1=' + chr( 127 ), 'bash',
|
# prompt is set to sentinel chr( 127 )
|
||||||
'--norc', '-mis', 'mininet:' + self.name ]
|
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
|
# Spawn a shell subprocess in a pseudo-tty, to disable buffering
|
||||||
# in the subprocess and insulate it from signals (e.g. SIGINT)
|
# in the subprocess and insulate it from signals (e.g. SIGINT)
|
||||||
# received by the parent
|
# received by the parent
|
||||||
|
|||||||
Reference in New Issue
Block a user