Package org.apache.helix

Examples of org.apache.helix.ExternalCommand.waitFor()


  }

  public static ProcessStateCode getProcessState(String processId) throws Exception {
    if (OS_NAME.equals("Mac OS X") || OS_NAME.equals("Linux")) {
      ExternalCommand cmd = ExternalCommand.start("ps", processId);
      cmd.waitFor();

      // split by new lines
      // should return 2 lines for an existing process, or 1 line for a non-existing process
      String lines[] = cmd.getStringOutput().split("[\\r\\n]+");
      if (lines.length != 2) {
View Full Code Here


  }
 
  public static ProcessStateCode getProcessState(String processId) throws Exception {
    if (OS_NAME.equals("Mac OS X") || OS_NAME.equals("Linux")) {
      ExternalCommand cmd = ExternalCommand.start("ps", processId);
      cmd.waitFor();
     
      // split by new lines
      // should return 2 lines for an existing process, or 1 line for a non-existing process
      String lines[] = cmd.getStringOutput().split("[\\r\\n]+");
      if (lines.length != 2) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.