Skip to content
Snippets Groups Projects
Commit 82e0e9f3 authored by Bob Lantz's avatar Bob Lantz
Browse files

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

parent 549f1ebc
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment