Skip to content
Snippets Groups Projects
Commit 0d39f110 authored by Cody Burkard's avatar Cody Burkard
Browse files

added code to kill stale mininet processes

parent 29e5bee3
No related branches found
No related tags found
No related merge requests found
......@@ -69,4 +69,18 @@ def cleanup():
if link:
sh( "ip link del " + link )
info( "*** Killing stale mininet node processes\n" )
sh( 'pkill -9 -f mininet:' )
# Make sure they are gone
while True:
try:
pids = co( 'pgrep -f mininet:'.split() )
except:
pids = ''
if pids:
sh( 'pkill -f 9 mininet:' )
sleep( .5 )
else:
break
info( "*** Cleanup complete.\n" )
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