Revision 6a363f65 mininet/node.py

View differences:

mininet/node.py
180 180
                self.cmd( 'mkdir -p %s' % directory ) 
181 181
                self.cmd( 'mount -n -t tmpfs tmpfs %s' % directory )
182 182

  
183
    def unmountPrivateDirs( self ):
184
        "mount private directories"
185
        for directory in self.privateDirs:
186
            if isinstance( directory, tuple ):
187
                self.cmd( 'umount ', directory[ 0 ] )
188
            else:
189
                self.cmd( 'umount ', directory )
190

  
183 191
    def _popen( self, cmd, **params ):
184 192
        """Internal method: spawn and return a process
185 193
            cmd: command to run (list)
......
229 237

  
230 238
    def terminate( self ):
231 239
        "Send kill signal to Node and clean up after it."
240
        self.unmountPrivateDirs()
232 241
        if self.shell:
233 242
            if self.shell.poll() is None:
234 243
                os.killpg( self.shell.pid, signal.SIGHUP )

Also available in: Unified diff