private int kill() throws CommandException {
    File prevPid = null;
    String pids = null;

    try {
      prevPid = new File(getServerDirs().getPidFile().getPath() + ".prev");

      if (!prevPid.canRead())
        throw new CommandException(Strings.get("StopInstance.nopidprev", prevPid));

      pids = FileUtils.readSmallFile(prevPid).trim();
      String s = ProcessUtils.kill(Integer.parseInt(pids));

      if (s != null) logger.finer(s);
    } catch (CommandException ce) {
      throw ce;
    } catch (Exception ex) {
      throw new CommandException(
          Strings.get("StopInstance.pidprevreaderror", prevPid, ex.getMessage()));
    }
    return 0;
  }