yiisoft / yiisoft/yii2-queue

AMQP Interop driver overrides global signal handlers and breaks SIGINT handling in other console commands

Open
#552 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.1k
Forks
285
Avg merge
5d 3h
Merged PRs (30d)
2

Description

Description

When using the AMQP Interop driver (src/drivers/amqp_interop/Queue.php), its init() method is executed during application bootstrap (because the driver implements BootstrapInterface)

Inside init(), the driver overrides signal handlers for:

  • SIGTERM
  • SIGQUIT
  • SIGINT
  • SIGHUP

(see also: https://github.com/yiisoft/yii2-queue/issues/379)

As a result, global signal handling is modified at application startup

This causes signals to stop working correctly in other console commands within the same project. For example, it becomes impossible to gracefully terminate unrelated console commands using SIGINT (Ctrl+C)

Package version

2.3.6

PHP version

8.4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/drivers/amqp_interop/Queue.php and inspect the init() method called during application bootstrap through BootstrapInterface. Reproduce the effect by running an unrelated console command and sending SIGINT after the AMQP Interop driver initializes. Done means unrelated console commands retain graceful SIGINT handling while the driver continues to initialize correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.