class AttachProcessUtils implements InternalProcessUtils {

  @Override
  public boolean isProcessAlive(final int pid) {
    isTrue(pid > 0, "Invalid pid '" + pid + "' specified");

    for (VirtualMachineDescriptor vm : VirtualMachine.list()) {
      if (vm.id().equals(String.valueOf(pid))) {
        return true; // found the vm
      }
    }
    return false;
  }

}