@@ -730,7 +730,7 @@ public function setCommandLine($commandline)
730
730
}
731
731
732
732
/**
733
- * Gets the process timeout.
733
+ * Gets the process timeout (max. runtime) .
734
734
*
735
735
* @return float|null The timeout in seconds or null if it's disabled
736
736
*/
@@ -740,17 +740,17 @@ public function getTimeout()
740
740
}
741
741
742
742
/**
743
- * Gets the process idle timeout.
743
+ * Gets the process idle timeout (max. time since last output) .
744
744
*
745
- * @return float|null
745
+ * @return float|null The timeout in seconds or null if it's disabled
746
746
*/
747
747
public function getIdleTimeout ()
748
748
{
749
749
return $ this ->idleTimeout ;
750
750
}
751
751
752
752
/**
753
- * Sets the process timeout.
753
+ * Sets the process timeout (max. runtime) .
754
754
*
755
755
* To disable the timeout, set this value to null.
756
756
*
@@ -768,9 +768,11 @@ public function setTimeout($timeout)
768
768
}
769
769
770
770
/**
771
- * Sets the process idle timeout.
771
+ * Sets the process idle timeout (max. time since last output) .
772
772
*
773
- * @param integer|float|null $timeout
773
+ * To disable the timeout, set this value to null.
774
+ *
775
+ * @param integer|float|null $timeout The timeout in seconds
774
776
*
775
777
* @return self The current Process instance.
776
778
*
@@ -991,7 +993,7 @@ public function checkTimeout()
991
993
throw new ProcessTimedOutException ($ this , ProcessTimedOutException::TYPE_GENERAL );
992
994
}
993
995
994
- if (0 < $ this ->idleTimeout && $ this ->idleTimeout < microtime (true ) - $ this ->lastOutputTime ) {
996
+ if (null !== $ this ->idleTimeout && $ this ->idleTimeout < microtime (true ) - $ this ->lastOutputTime ) {
995
997
$ this ->stop (0 );
996
998
997
999
throw new ProcessTimedOutException ($ this , ProcessTimedOutException::TYPE_IDLE );
0 commit comments