code: private static void sigKillInCurrentThread(String pid, boolean isProcessGroup,
        long sleepTimeBeforeSigKill) {
      // Kill the subprocesses of root process(even if the root process is not
      // alive) if process group is to be killed.
      if (isProcessGroup || ProcessTree.isAlive(pid)) {
        try {
          // Sleep for some time before sending SIGKILL
          Thread.sleep(sleepTimeBeforeSigKill);
        } catch (InterruptedException i) {
          LOG.warn("Thread sleep is interrupted.");
        }
        if(isProcessGroup) {
          killProcessGroup(pid);
        } else {
          killProcess(pid);
        }
      }  
    }
docs: Kills the process(OR process group) by sending the signal SIGKILL
  in the current thread
  @param pid Process id(OR process group id) of to-be-deleted-process
  @param isProcessGroup Is pid a process group id of to-be-deleted-processes
  @param sleepTimeBeforeSigKill wait time before sending SIGKILL after
  sending SIGTERM