public static boolean sessionIsRunning(){
  if (mProcess == null)   return false;
  try {
    mProcess.exitValue();
    return false;
  }
 catch (  IllegalThreadStateException ex) {
    return true;
  }
}

public static boolean sessionIsRunning ( ) { if ( mProcess == null ) return false ; try { mProcess . exitValue ( ) ; return false ; } catch ( IllegalThreadStateException ex ) { return true ; } }
gets whether the su session is running
