Libraries anvil io Process waitFor

int waitFor()
causes the current thread to wait, if necessary, until the process represented by this Process object hasterminated.
Returns the exit value of the process. By convention, 0 indicates normal termination.
Throws Interrupted -  if the current thread is interrupted by another thread while it is waiting, then the wait is ended and an Interrupted is thrown.