Skip to content
Snippets Groups Projects
Commit 6a363f65 authored by cody burkard's avatar cody burkard
Browse files

unmount private directories after use

parent 736db20c
No related branches found
No related tags found
No related merge requests found
......@@ -180,6 +180,14 @@ def mountPrivateDirs( self ):
self.cmd( 'mkdir -p %s' % directory )
self.cmd( 'mount -n -t tmpfs tmpfs %s' % directory )
def unmountPrivateDirs( self ):
"mount private directories"
for directory in self.privateDirs:
if isinstance( directory, tuple ):
self.cmd( 'umount ', directory[ 0 ] )
else:
self.cmd( 'umount ', directory )
def _popen( self, cmd, **params ):
"""Internal method: spawn and return a process
cmd: command to run (list)
......@@ -229,6 +237,7 @@ def write( self, data ):
def terminate( self ):
"Send kill signal to Node and clean up after it."
self.unmountPrivateDirs()
if self.shell:
if self.shell.poll() is None:
os.killpg( self.shell.pid, signal.SIGHUP )
......
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