kill all child processes to avoid race condition and no controller shutdown
This commit is contained in:
+1
-6
@@ -205,7 +205,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.killpg( self.pid, signal.SIGKILL )
|
os.killpg( self.pid, signal.SIGHUP )
|
||||||
self.cleanup()
|
self.cleanup()
|
||||||
|
|
||||||
def stop( self ):
|
def stop( self ):
|
||||||
@@ -1269,11 +1269,6 @@ class Controller( Node ):
|
|||||||
' 1>' + cout + ' 2>' + cout + '&' )
|
' 1>' + cout + ' 2>' + cout + '&' )
|
||||||
self.execed = False
|
self.execed = False
|
||||||
|
|
||||||
def stop( self ):
|
|
||||||
"Stop controller."
|
|
||||||
self.cmd( 'kill %' + self.command )
|
|
||||||
self.terminate()
|
|
||||||
|
|
||||||
def IP( self, intf=None ):
|
def IP( self, intf=None ):
|
||||||
"Return IP address of the Controller"
|
"Return IP address of the Controller"
|
||||||
if self.intfs:
|
if self.intfs:
|
||||||
|
|||||||
Reference in New Issue
Block a user