docs: function interceptDeath(process, events) {
      var closeEvent = helpers.support.close;
  
      // all channels are closed
      process.once(closeEvent ? 'close' : 'exit', events.close);
  
      // the process died
      if (closeEvent) {
        process.once('exit', events.exit);
      } else {
  
        // intercept internal onexit call
        var internalHandle = process._internal.onexit;
        process._internal.onexit = function () {
          events.exit();
          internalHandle.apply(this, arguments);
        };
      }
    }