8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f19b26 commit 2814feaCopy full SHA for 2814fea
components/process.rst
@@ -233,6 +233,21 @@ in the output and its type::
233
}
234
});
235
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`:
239
+
240
+ $process = new Process(array('/usr/bin/php', 'slow-starting-server.php'));
241
+ $process->start();
242
243
+ // ... do other things
244
245
+ $process->waitUntil(function ($type, $output) {
246
+ return $output === 'Ready. Waiting for commands...';
247
+ });
248
249
+ // ... do things after the process is ready
250
251
Streaming to the Standard Input of a Process
252
--------------------------------------------
253
0 commit comments