Beispiel #1
0
/**
 * This routine tells if an open ET system is alive (heartbeat is going).
 *
 * This routine behaves differently depending on whether it is run locally or remotely.
 * If the user is running it locally, a thread of the user's process is constantly checking
 * to see if the ET system is alive and provides a valid return value to et_alive when last
 * it was monitored (up to three heartbeats ago). If the user is on a remote node, the ET
 * system's server thread is contacted. If that communication succeeds, then the ET system
 * is alive by definition, otherwise it is dead.
 *
 * @param id     ET system id.
 *
 * @returns 1    if ET system is alive.
 * @returns 0    if ET system is dead or bad arg.
 */
int et_alive(et_sys_id id) {

    et_id *etid = (et_id *) id;

    if (id == NULL) return 0;

    if (etid->locality == ET_REMOTE) {
        return etr_alive(id);
    }
    else if (etid->locality == ET_LOCAL_NOSHARE) {
        return etn_alive(id);
    }
    return etl_alive(id);
}
Beispiel #2
0
int et_alive(et_sys_id id)
{
  return etr_alive(id);
}