Change to use printf rather than echo.
This commit is contained in:
+2
-3
@@ -70,8 +70,7 @@ class Node( object ):
|
|||||||
self.inNamespace = inNamespace
|
self.inNamespace = inNamespace
|
||||||
if self.inNamespace:
|
if self.inNamespace:
|
||||||
opts += '-n'
|
opts += '-n'
|
||||||
# xpg_echo is needed so we can echo our sentinel in sendCmd
|
cmd = [ 'mnexec', opts, 'bash', '-m' ]
|
||||||
cmd = [ 'mnexec', opts, 'bash', '-O', 'xpg_echo', '-m' ]
|
|
||||||
self.shell = Popen( cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT,
|
self.shell = Popen( cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT,
|
||||||
close_fds=False )
|
close_fds=False )
|
||||||
self.stdin = self.shell.stdin
|
self.stdin = self.shell.stdin
|
||||||
@@ -168,7 +167,7 @@ class Node( object ):
|
|||||||
separator = ';'
|
separator = ';'
|
||||||
if printPid and not isShellBuiltin( cmd ):
|
if printPid and not isShellBuiltin( cmd ):
|
||||||
cmd = 'mnexec -p ' + cmd
|
cmd = 'mnexec -p ' + cmd
|
||||||
self.write( cmd + separator + ' echo -n "\\0177" \n' )
|
self.write( cmd + separator + ' printf "\\177" \n' )
|
||||||
self.lastCmd = cmd
|
self.lastCmd = cmd
|
||||||
self.lastPid = None
|
self.lastPid = None
|
||||||
self.waiting = True
|
self.waiting = True
|
||||||
|
|||||||
Reference in New Issue
Block a user