@@ -233,21 +233,26 @@ in the output and its type::
233233 }
234234 });
235235
236- You may want to wait for a specific output of the process you started
237- asynchronously, for this use case you may use the method
238- :method: `Symfony\\ Component\\ Process\\ Process::waitUntil `:
236+ Instead of waiting until the process has finished, you can use the
237+ :method: `Symfony\\ Component\\ Process\\ Process::waitUntil ` method to keep or stop
238+ waiting based on some PHP logic. The following example starts a long running
239+ process and checks its output to wait until its fully initialized::
239240
240241 $process = new Process(array('/usr/bin/php', 'slow-starting-server.php'));
241242 $process->start();
242243
243244 // ... do other things
244245
246+ // waits until the given anonymous function returns true
245247 $process->waitUntil(function ($type, $output) {
246248 return $output === 'Ready. Waiting for commands...';
247249 });
248250
249251 // ... do things after the process is ready
250252
253+ ..versionadded ::4.2
254+ The ``waitUntil() `` method was introduced in Symfony 4.2.
255+
251256Streaming to the Standard Input of a Process
252257--------------------------------------------
253258