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

Signal handlers not registered for redis-cli #4700

Open
rabbitfang opened this issue Feb 22, 2018 · 0 comments
Open

Signal handlers not registered for redis-cli #4700

rabbitfang opened this issue Feb 22, 2018 · 0 comments

Comments

@rabbitfang
Copy link

When running redis-cli as PID 1 (e.g. within a container), the process can only be killed with SIGKILL. This is because PID 1 ignores all signals not explicitly handled by the process, and redis-cli does not generally register its own signal handler (except when using --intrinsic-latency). This prevents the user from aborting long-running commands such as --scan and --stat.

Steps to reproduce

  1. Run docker run -d redis:4 redis-cli -h $HOST --stat where $HOST is an active redis instance
  2. Run docker ps to verify redis-cli is running.
  3. Run docker kill -s INT $ID (where $ID is the container ID of the redis-cli container) to send the SIGINT signal to the redis-cli process.
  4. Run docker ps

Expected result

  • The redis-cli container is no longer running.

Actual result

  • The redis-cli container is still running. If you attach to the container, you will see that the container did not react to the signal at all (it is still scanning).

Versions

Tested and verified on redis-cli version 4.0.8 and 2.8.23.

Proposed solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant