node: kill entire process group in terminate
mnexec already puts the shell into its own process group. Killing the entire process group cleans up after any background processes the user left running.
This commit is contained in:
+1
-1
@@ -184,7 +184,7 @@ class Node( object ):
|
|||||||
def terminate( self ):
|
def terminate( self ):
|
||||||
"Send kill signal to Node and clean up after it."
|
"Send kill signal to Node and clean up after it."
|
||||||
if self.shell:
|
if self.shell:
|
||||||
os.kill( self.pid, signal.SIGKILL )
|
os.killpg( self.pid, signal.SIGKILL )
|
||||||
self.cleanup()
|
self.cleanup()
|
||||||
|
|
||||||
def stop( self ):
|
def stop( self ):
|
||||||
|
|||||||
Reference in New Issue
Block a user