pcntl_fork
reactphp/event-loop
Supported Versions: PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8
Forks the currently running process
pcntl_fork
():
int
protected function
forkSendSignal
(
$signal
)
{
$currentPid
=
posix_getpid
();
$childPid
=
pcntl_fork
();
if (
$childPid
== -
1
) {
$this
->
fail
(
"Failed to fork child process!"
);
} else if (
$childPid
===
0
) {
tests/StreamSelectLoopTest.php