prevent warning when pcntl_fork() is on disable_functions php.ini bla… (#1476)

* prevent warning when pcntl_fork() is on disable_functions php.ini blacklist

* Update CHANGELOG.md

* Update Reporter.php

* Update CHANGELOG.md
This commit is contained in:
Markus Staab 2018-01-06 14:17:33 +01:00 committed by Anton Medvedev
parent 2b9792f9cd
commit 703292c1e9
2 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,7 @@
### Fixed
- fix within() to also restore the working-path when the given callback throws a Exception [#1463]
- `pcntl_fork` is blacklisted per default on ubuntu lts boxes. make sure deployer doesnt emit a warning in this case [#1476]
## v6.0.5
[v6.0.4...v6.0.5](https://github.com/deployphp/deployer/compare/v6.0.4...v6.0.5)
@ -343,6 +344,7 @@
- Fixed remove of shared dir on first deploy
[#1481]: https://github.com/deployphp/deployer/issues/1481
[#1476]: https://github.com/deployphp/deployer/pull/1476
[#1472]: https://github.com/deployphp/deployer/pull/1472
[#1463]: https://github.com/deployphp/deployer/pull/1463
[#1455]: https://github.com/deployphp/deployer/pull/1455

View File

@ -17,7 +17,8 @@ class Reporter
public static function report(array $stats)
{
$pid = null;
if (extension_loaded('pcntl')) {
// make sure function is not disabled via php.ini "disable_functions"
if (extension_loaded('pcntl') && function_exists('pcntl_fork')) {
declare(ticks = 1);
$pid = pcntl_fork();
}