Skip to content

Commit 871b340

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents fc8a060 + e1cf110 commit 871b340

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

components/process.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,25 @@ check regularly::
210210

211211
.. _reference-process-signal:
212212

213+
Process Idle Timeout
214+
--------------------
215+
216+
.. versionadded:: 2.4
217+
The :method:`Symfony\\Component\\Process\\Process::setIdleTimeout` method was added in Symfony 2.4.
218+
219+
In contrast to the timeout of the previous paragraph, the idle timeout only
220+
considers the time since the last output was produced by the process::
221+
222+
use Symfony\Component\Process\Process;
223+
224+
$process = new Process('something-with-variable-runtime');
225+
$process->setTimeout(3600);
226+
$process->setIdleTimeout(60);
227+
$process->run();
228+
229+
In the case above, a process is considered timed out, when either the total runtime
230+
exceeds 3600 seconds, or the process does not produce any output for 60 seconds.
231+
213232
Process Signals
214233
---------------
215234

0 commit comments

Comments
 (0)