How can i receive signal in the jvm?
See original GitHub issueI use /bin/bash to run jvm as a child process, but i can’t receive signal in the jvm.
Dockerfile
:
ENTRYPOINT ["/dumb-init", "--", "/docker-entrypoint.sh"]
and docker-entrypoint.sh
:
#!/usr/bin/dumb-init /bin/bash
source `dirname $0`/init-product.sh
if [ -z "$POOL_TYPE" ]; then
source `dirname $0`/init.sh $RESOURCE_ID
echo "****FINISHED****"
else
echo "****FINISHED****"
java -Xmx64m -Xms16m -Xmn8m -Xss1m -XX:ReservedCodeCacheSize=5m -XX:NewRatio=3 -jar /usr/local/agent/agent-1.0.1.jar $POOL_TYPE
fi
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Signals used by the JVM - IBM
Signal Name Signal type Disabled by ‑Xrs Disabled by ‑Xrs:sync
SIGSEGV (11) Exception Yes Yes
SIGILL (4) Exception Yes Yes
SIGFPE (8) Exception Yes Yes
Read more >7 Handle Signals and Exceptions - Java
This chapter provides information about how signals and exceptions are handled by the Java HotSpot Virtual Machine. It also describes the signal chaining ......
Read more >Handle signals in the Java Virtual Machine - Stack Overflow
The JVM responds to signals on its own. Some will cause the JVM to shutdown gracefully, which includes running shutdown hooks.
Read more >How the JVM processes signals - setgetweb.com
When a signal is raised that is of interest to the JVM, a signal handler is called. This signal handler determines whether it...
Read more >How can i receive signal in the jvm? · Issue #72 · krallin/tini
tini proxies signals to its immediate child (bash in this case), but bash does not, so your entrypoint breaks signal forwarding here (the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yep that looks correct as long as you have the
ENTRYPOINT
set as OP does@asottile // @VFT Quick followup question, when you mention unnecessary
/bin/bash
in the shebang do you mean it should be completely omitted? What should it look like when done correctly based on your directionsIs this correct for the process tree or since entry-point defines dumb-init does this inherit correctly?