docs: public static ProcessReturn procWaitWithProcessReturn (Process process, final long timeout) throws OSHelperException {
  		long endTime = Calendar.getInstance ().getTimeInMillis () + timeout;
  
  		boolean terminatedByItself = false;
  
  		ProcessReturn processReturn = new ProcessReturn ();
  		while (Calendar.getInstance ().getTimeInMillis () < endTime) {
  			try {
  				InputStream stdoutIs = process.getInputStream ();
  				processReturn.stdout = readInputStreamAsString (stdoutIs);
  
  				InputStream stderrIs = process.getErrorStream ();
  				processReturn.stderr = readInputStreamAsString (stderrIs);
  
  				processReturn.exitCode = process.exitValue ();
  				processReturn.exitStatus = ProcessReturn.osh_PROCESS_EXITED_BY_ITSELF;
  
  				terminatedByItself = true;
  			} catch (IllegalThreadStateException ex) {	// the process has not yet terminated
  				terminatedByItself = false;
  			}
  			if (terminatedByItself) {
  				break;
  			}
  		}
  		if (!terminatedByItself) {
  			process.destroy ();
  
  			try {
  				InputStream stdoutIs = process.getInputStream ();
  				processReturn.stdout = readInputStreamAsString (stdoutIs);
  
  				InputStream stderrIs = process.getErrorStream ();
  				processReturn.stderr = readInputStreamAsString (stderrIs);
  
  				processReturn.exitCode = process.waitFor ();
  			} catch (InterruptedException ex) {
  				throw new OSHelperException (ex);
  			}
  
  			processReturn.exitStatus = ProcessReturn.osh_PROCESS_KILLED_BY_TIMEOUT;
  		}
  
  		return processReturn;
  	}