Skip to content

Commit b9b3165

Browse files
committed
Merge branch '2.1' into 2.2
2 parents 8666ca5 + 4493238 commit b9b3165

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

components/process.rst

+14
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ are done doing other stuff::
102102
}
103103
});
104104

105+
Stopping a Process
106+
------------------
107+
108+
Any asynchronous process can be stopped at any time with the
109+
:method:`Symfony\\Component\\Process\\Process::stop` method. This method takes
110+
a timeout as its argument. Once the timeout is reached, the process is terminated.
111+
112+
$process = new Process('ls -lsa');
113+
$process->start();
114+
115+
// ... do other things
116+
117+
$process->stop(3);
118+
105119
Executing PHP Code in Isolation
106120
-------------------------------
107121

0 commit comments

Comments
 (0)