Restore non-mnexec pid detection for background commands
This commit is contained in:
+5
-1
@@ -234,7 +234,11 @@ 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 ):
|
||||||
cmd = 'mnexec -p ' + 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
|
||||||
self.write( cmd + '\n' )
|
self.write( cmd + '\n' )
|
||||||
self.lastPid = None
|
self.lastPid = None
|
||||||
self.waiting = True
|
self.waiting = True
|
||||||
|
|||||||
Reference in New Issue
Block a user