Skip to content

Commit

Permalink
Merge pull request #39 from zKoz210/fixed-terminating-php82
Browse files Browse the repository at this point in the history
Fixed #36
  • Loading branch information
freekmurze committed May 16, 2023
2 parents 575df36 + 4ec939c commit ad46206
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -46,6 +46,7 @@ on [our virtual postcard wall](https://spatie.be/open-source/postcards).
This package requires PHP 8 and the [pcntl](https://www.php.net/manual/en/intro.pcntl.php) extensions which is installed in many Unix and Mac systems by default.

❗️ [pcntl](https://www.php.net/manual/en/intro.pcntl.php) only works in CLI processes, not in a web context.
❗️ [posix](https://www.php.net/manual/en/book.posix.php) required for correct handling of process termination for Alpine Linux.

## Installation

Expand Down
4 changes: 4 additions & 0 deletions src/Fork.php
Expand Up @@ -127,6 +127,10 @@ protected function forkForTask(Task $task): Task

$this->executeInChildTask($task, $socketToParent);

if (extension_loaded('posix')) {
posix_kill(getmypid(), SIGKILL);
}

exit;
}

Expand Down

0 comments on commit ad46206

Please sign in to comment.