Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pcntl_signal_dispatch after job finish for php extension #485

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fix exiting for docker
  • Loading branch information
dimansuvorlinda committed Jul 14, 2023
commit bd92d80998a593172cf6701f143253999974a8e2
7 changes: 3 additions & 4 deletions src/drivers/amqp_interop/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Interop\Amqp\AmqpQueue;
use Interop\Amqp\AmqpTopic;
use Interop\Amqp\Impl\AmqpBind;
use Yii;
use yii\base\Application as BaseApp;
use yii\base\Event;
use yii\base\NotSupportedException;
Expand Down Expand Up @@ -298,8 +299,7 @@ public function init()
$oldHandler($signal);
}

pcntl_signal($signal, SIG_DFL);
posix_kill(posix_getpid(), $signal);
Yii::$app->end();
});
}
}
Expand Down Expand Up @@ -334,8 +334,7 @@ public function listen()

foreach ($signals as $signal) {
pcntl_signal($signal, static function ($signal) {
pcntl_signal($signal, SIG_DFL);
posix_kill(posix_getpid(), $signal);
Yii::$app->end();
});
}
}
Expand Down