code: function connect() {
      let port = null;
  
      try {
        port = parseInt(readFileSync(path.join(
          datadir,
          'control-port'
        )).toString().split(':')[1]);
      } catch (err) {
        /* istanbul ignore next */
        portFileReads++;
  
        /* istanbul ignore next */
        if (portFileReads <= 20) {
          return setTimeout(() => connect(), 1000);
        } else {
          return controller.emit('error',
                                 new Error('Failed to read control port'));
        }
      }
  
      socket.connect(port, '127.0.0.1');
    }
docs: NB: Expose the tor process to userland