From 2200d8d1736bd9c042653600e17d71fa9fbcbf00 Mon Sep 17 00:00:00 2001 From: Rich Lane Date: Fri, 13 Dec 2013 17:39:38 -0800 Subject: [PATCH] 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. --- mininet/node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mininet/node.py b/mininet/node.py index 52e6896..64f143a 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -184,7 +184,7 @@ class Node( object ): def terminate( self ): "Send kill signal to Node and clean up after it." if self.shell: - os.kill( self.pid, signal.SIGKILL ) + os.killpg( self.pid, signal.SIGKILL ) self.cleanup() def stop( self ):