pcntl_waitpid
Supported Versions: PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8
Waits on or returns the status of a forked child
pcntl_waitpid
(
int $process_id
,
int
&
$status
,
int $flags
=
0
,
array
&
$resource_usage
= []):
int
laravel/framework
}
}
while (
pcntl_waitpid
(
0
,
$status
) != -
1
) {
$status
=
pcntl_wexitstatus
(
$status
);
$result
*=
$status
;
}
tests/Filesystem/FilesystemTest.php
spatie/fork
{
$this
->
output
.=
$this
->
connection
->
read
()->
current
();
$status
=
pcntl_waitpid
(
$this
->
pid
(),
$status
,
WNOHANG
|
WUNTRACED
);
if (
$status
===
$this
->
pid
) {
return
true
;
src/Task.php