From 2e25e0037c2d67872c3775ec1a515329beeb1d46 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sun, 4 Aug 2013 16:08:10 +0200 Subject: [PATCH 1/2] adds docs for idle timeout (see symfony/symfony#8651) --- components/process.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/components/process.rst b/components/process.rst index 56ba1686513..9c459dc742d 100644 --- a/components/process.rst +++ b/components/process.rst @@ -210,6 +210,25 @@ check regularly:: .. _reference-process-signal: +Process Idle Timeout +-------------------- + +.. versionadded:: 2.4 + The ``setIdleTimeout`` method was added in Symfony 2.4. + +In contrast to the timeout of the previous paragraph, the idle timeout only +considers the time since the last output was produced by the process:: + + use Symfony\Component\Process\Process; + + $process = new Process('something-with-variable-runtime'); + $process->setTimeout(3600); + $process->setIdleTimeout(60); + $process->run(); + +In the case above, a process is considered timed out, when either the total runtime +exceeds 3600 seconds, or the process does not produce any output for 60 seconds. + Process Signals --------------- From 3fa71b83602864c10af749d698bf64cfd4b6bb9b Mon Sep 17 00:00:00 2001 From: Johannes Date: Sun, 4 Aug 2013 16:37:52 +0200 Subject: [PATCH 2/2] adds api link --- components/process.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/process.rst b/components/process.rst index 9c459dc742d..c10824d77dd 100644 --- a/components/process.rst +++ b/components/process.rst @@ -214,7 +214,7 @@ Process Idle Timeout -------------------- .. versionadded:: 2.4 - The ``setIdleTimeout`` method was added in Symfony 2.4. + The :method:`Symfony\\Component\\Process\\Process::setIdleTimeout` method was added in Symfony 2.4. In contrast to the timeout of the previous paragraph, the idle timeout only considers the time since the last output was produced by the process::