Restore non-mnexec pid detection for background commands
This commit is contained in:
@@ -234,6 +234,10 @@ class Node( object ):
|
|||||||
cmd = 'echo -n'
|
cmd = 'echo -n'
|
||||||
self.lastCmd = cmd
|
self.lastCmd = cmd
|
||||||
if printPid and not isShellBuiltin( cmd ):
|
if printPid and not isShellBuiltin( cmd ):
|
||||||
|
if len( cmd ) > 0 and cmd[ -1 ] == '&':
|
||||||
|
# print ^A{pid}\n so monitor() can set lastPid
|
||||||
|
cmd += ' printf "\\001%d\n" $! \n'
|
||||||
|
else:
|
||||||
cmd = 'mnexec -p ' + cmd
|
cmd = 'mnexec -p ' + cmd
|
||||||
self.write( cmd + '\n' )
|
self.write( cmd + '\n' )
|
||||||
self.lastPid = None
|
self.lastPid = None
|
||||||
|
|||||||
Reference in New Issue
Block a user