Comments (3)
I think this means your process doesn't have a handler for SIGUSR2
registered; from signal(7)
(https://manpages.debian.org/bullseye/manpages/signal.7.en.html#Standard_signals), SIGUSR2
is a terminating signal by default.
from tini.
Hm, I didn't know SIGUSRs are terminating by default, that's why used a random web server as example, sorry. But initially this issue happened with my own image which has a SIGUSR2 handler. I've created a POC repo: https://github.com/rayrapetyan/test_sig.
Steps to reproduce the issue:
- Run cmd.sh locally
- See output:
PID of this script: 433226
Running....
Running....
...
- Send SIGUSR2 signal:
kill -SIGUSR2 433226
- Notice signal was intercepted in cmd.sh:
handling SIGUSR2
Running....
and process continues running as expected.
Now run cmd.sh from container:
docker build -t test_sig:latest .
docker run --rm --init --name test_sig test_sig:latest
Send SIGUSR2:
docker kill --signal SIGUSR2 test_sig
Expected: cmd.sh running inside a docker container should receive and handle a signal and continue running.
Actual: container stops.
Now after looking into how cmd.sh is running inside a container:
/sbin/docker-init -- /bin/sh -c ./cmd.sh -> bash cmd.sh
I realize that because of /bin/sh is running before bash, it's intercepting all signals and doesn't forward them to a child processes (bash) properly?
from tini.
Works when running as:
docker run --rm --init --name test_sig test_sig:latest ./cmd.sh
so no /bin/sh in between.
from tini.
Related Issues (20)
- Event not generated when File change happens HOT 1
- About Tini version planning? HOT 2
- aarch64 version available? HOT 3
- stack-protector not work HOT 4
- [FATAL tini (7)] exec bash failed: No such file or directory HOT 3
- [CVE-2023-25139]tini-static executable seems vulnerable HOT 1
- example / explanation HOT 1
- How can I confirm that tini is running? HOT 1
- prctl(PR_SET_PDEATHSIG, ...) should be called after fork(), not before HOT 4
- MI6&termux&clang-16 build failed HOT 2
- Using "docker run --init" with arguments to tini HOT 3
- tini docker windows container HOT 1
- Command-line parsing is broken if compiled with TINI_MINIMAL
- tini not running as child subreaper on AWS Lambda HOT 4
- dnf/rpm install -y tini not working HOT 1
- Latest release changed to 0.18. then switched back to 0.19 HOT 2
- Ubuntu 22.04 LTS tini install not working HOT 2
- Use Tini to ignore some signals and not pass them down.
- Running tini with subreaper on aws lambda HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tini.