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

Restore non-mnexec pid detection for background commands

parent e9013d76
No related branches found
No related tags found
No related merge requests found
...@@ -234,7 +234,11 @@ def sendCmd( self, *args, **kwargs ): ...@@ -234,7 +234,11 @@ def sendCmd( self, *args, **kwargs ):
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
......
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