code: def close(self):
          
          # TODO: DRY with workerLaunch.py
          # Ensure everything is cleaned up on exit
          scoop.logger.debug('Closing broker on host {0}.'.format(self.hostname))
  
          # Terminate subprocesses
          try:
              self.shell.terminate()
          except OSError:
              pass
  
          # Output child processes stdout and stderr to console
          sys.stdout.write(self.shell.stdout.read().decode("utf-8"))
          sys.stdout.flush()
  
          sys.stderr.write(self.shell.stderr.read().decode("utf-8"))
          sys.stderr.flush()
docs: Connection(s) cleanup.