Esempio n. 1
0
  public static boolean processCheck() throws IOException, ProcessException {
    Set<String> afterPid = own.check();
    for (String pid : afterPid) if (!beforePid.contains(pid)) enjuPid = pid;

    if (enjuPid == null) throw new ProcessException();
    return true;
  }
Esempio n. 2
0
  /**
   * Check the enju process has been destroyed or not. If the process is destroyed, it return true.
   *
   * @return
   * @throws IOException
   */
  public static boolean checkDestroyed() throws IOException {
    Set<String> alivePid = own.check();

    return alivePid.contains(enjuPid) | enjuPid != null ? false : true;
  }