MCPcopy Create free account
hub / github.com/mininet/mininet / cleanup

Method cleanup

mininet/node.py:226–240  ·  view source on GitHub ↗

Help python collect its garbage.

( self )

Source from the content-addressed store, hash-verified

224 return popen
225
226 def cleanup( self ):
227 "Help python collect its garbage."
228 # We used to do this, but it slows us down:
229 # Intfs may end up in root NS
230 # for intfName in self.intfNames():
231 # if self.name in intfName:
232 # quietRun( 'ip link del ' + intfName )
233 if self.shell:
234 # Close ptys
235 self.stdin.close()
236 os.close(self.slave)
237 if self.waitExited:
238 debug( 'waiting for', self.pid, 'to terminate\n' )
239 self.shell.wait()
240 self.shell = None
241
242 # Subshell I/O, commands and control
243

Callers 2

terminateMethod · 0.95
cleanupMethod · 0.45

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected