exit(child, code) {

    let index = this.children.indexOf(child);

    if (index === -1) {
      return;
    }

    this.children.splice(index, 1);

    if (code === 0) {
      child = cluster.fork();
      this.children.push(child);
      child.on('message', this.message.bind(this));
      child.on('exit', this.exit.bind(this, child));
    }

    if (this.children.length === 0) {
      this.idle();
    }

  }
Shut down a child process given a specific exit code. (Reboot if clean shutdown.)
@param {child_process} child
@param {Number} code Exit status codes