Change to use printf rather than echo.

This commit is contained in:
Bob Lantz
2010-03-24 17:02:44 -07:00
parent 67516aa44f
commit 47acf53974
+2 -3
View File
@@ -70,8 +70,7 @@ class Node( object ):
self.inNamespace = inNamespace
if self.inNamespace:
opts += '-n'
# xpg_echo is needed so we can echo our sentinel in sendCmd
cmd = [ 'mnexec', opts, 'bash', '-O', 'xpg_echo', '-m' ]
cmd = [ 'mnexec', opts, 'bash', '-m' ]
self.shell = Popen( cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT,
close_fds=False )
self.stdin = self.shell.stdin
@@ -168,7 +167,7 @@ class Node( object ):
separator = ';'
if printPid and not isShellBuiltin( cmd ):
cmd = 'mnexec -p ' + cmd
self.write( cmd + separator + ' echo -n "\\0177" \n' )
self.write( cmd + separator + ' printf "\\177" \n' )
self.lastCmd = cmd
self.lastPid = None
self.waiting = True