code: public boolean softKill(final long time, final TimeUnit unit)
        throws InterruptedException {
      checkStarted();
      if (this.processId != 0 && isStarted()) {
        try {
          if (this.isExecuteAsUser) {
            final String cmd =
                String.format("%s %s %s %d", this.executeAsUserBinary,
                    this.effectiveUser, KILL_COMMAND, this.processId);
            Runtime.getRuntime().exec(cmd);
          } else {
            final String cmd = String.format("%s %d", KILL_COMMAND, this.processId);
            Runtime.getRuntime().exec(cmd);
          }
          return this.completeLatch.await(time, unit);
        } catch (final IOException e) {
          this.logger.error("Kill attempt failed.", e);
        }
        return false;
      }
      return false;
    }
docs: Attempt to kill the process, waiting up to the given time for it to die
  
  @param time The amount of time to wait
  @param unit The time unit
  @return true iff this soft kill kills the process in the given wait time.