Help python collect its garbage.
( self )
| 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 |