'Send kill signal to Node and clean up after it.'

def terminate(self):

    self.unmountPrivateDirs()
    if self.shell:
        if (self.shell.poll() is None):
            os.killpg(self.shell.pid, signal.SIGHUP)
    self.cleanup()
