Comments (2)
It's not only about looking for a handler script when a signal arrives. s6-svscan
has to explicitly catch the signal first. That's why you couldn't make SIG???
work - the signals you wanted are simply not caught.
There's no major theoretical objection to what you want, but there are a few practical ones, that makes catching each and every signal very difficult to do portably. One of them is that there is an implementation-defined set of signals you just cannot trap, and on some systems sigaction()
fails, and making sure the failure is due to an uncatchable signal and not a kernel issue is a problem that requires either a lot of code, or #ifdef
mazes, to be solved correctly. Other issues are, for instance, how to establish a bijection between a signal such as SIGRTMIN+3
and its handler script for an (almost) arbitrarily large number of signals, without breaking compatibility with existing names, and without being entirely counter-intuitive (SIG13
, SIG14
, SIGTERM
, SIG16
, what?)
s6-svscan
aims to be portable, and is a very critical piece of code, so I want to keep it as simple as possible. I had already thought about generalizing the signal diversion mechanism, but in the end the benefits aren't worth the amount of code and complexity that it would add. I'm sorry. You'll end up with much less complexity on your system by just setting lxc.signal.halt
. :-)
from s6.
No worries. Thought it couldn't hurt to ask :) I figured it was something more complex than I was aware of in my limited C knowledge. I'm developing some generic LXC images and I was trying to avoid having to tell people to always set lxc.signal.halt
, but sounds like that's the easiest solution. Thank you for the detailed explanation!
from s6.
Related Issues (20)
- importas bug HOT 1
- Unable to build after #82e33dd HOT 1
- selfpipe_init: error with s6-svscan HOT 2
- compiling s6 using tcc failed HOT 3
- Exec Stop Functionality in s6 HOT 5
- ExecStartPost equivalent functionality in s6 HOT 2
- readiness notification not working HOT 2
- [Question] transition to s6 based init HOT 3
- A few questions HOT 2
- Philosophy on command line built in help `--help` HOT 2
- Failing to build the latest s6 V2.10.0.0 HOT 1
- Failed to build the latest s6 v2.10.0.0 HOT 1
- s6-svscan shows warning messages on arm32v7/alpine container HOT 1
- [feature] Provide already-built (perhaps statically linked) binaries HOT 3
- Broken link to s6-svperms in overview HOT 1
- s6-svc -d and other signals are not affecting service as expected? HOT 3
- Noob here, I have a couple of questions. HOT 1
- adding hostname in s6-socklog lines and date repetition in s6-log HOT 6
- [Feature Request] Add i18n Support HOT 5
- Installation Error 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 s6.