io/exec.js
function(result, onKill) {
  /** @return {boolean} Whether this command is still running. */
  this.isRunning = function() {
    return result.isPending();
  };

  /**
   * @return {!promise.Promise.<!Result>} A promise for the result of this
   *     command.
   */
  this.result = function() {
    return result;
  };

  /**
   * Sends a signal to the underlying process.
   * @param {string=} opt_signal The signal to send; defaults to
   *     {@code SIGTERM}.
   */
  this.kill = function(opt_signal) {
    onKill(opt_signal || 'SIGTERM');
  };
}
function(result, onKill) {
  /** @return {boolean} Whether this command is still running. */
  this.isRunning = function() {
    return result.isPending();
  };

  /**
   * @return {!promise.Promise.<!Result>} A promise for the result of this
   *     command.
   */
  this.result = function() {
    return result;
  };

  /**
   * Sends a signal to the underlying process.
   * @param {string=} opt_signal The signal to send; defaults to
   *     {@code SIGTERM}.
   */
  this.kill = function(opt_signal) {
    onKill(opt_signal || 'SIGTERM');
  };
}
function ( result , onKill ) { /** @return {boolean} Whether this command is still running. */ this . isRunning = function ( ) { return result . isPending ( ) ; } ; /**
   * @return {!promise.Promise.<!Result>} A promise for the result of this
   *     command.
   */ this . result = function ( ) { return result ; } ; /**
   * Sends a signal to the underlying process.
   * @param {string=} opt_signal The signal to send; defaults to
   *     {@code SIGTERM}.
   */ this . kill = function ( opt_signal ) { onKill ( opt_signal || 'SIGTERM' ) ; } ; }
Represents a command running in a sub-process.
@param {!promise.Promise.<!Result>} result The command result.
@constructor
Represents a command running in a sub - process .