-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
kiwix-serve should handle signals within docker #482
Comments
I would say that kiwix-serve should behave (if specified in command line) as a standard (and correctly implemented) daemon. https://www.freedesktop.org/software/systemd/man/daemon.html explain pretty well what need to be implemented. Implementing new style daemon implies to correctly handle |
@veloman-yunkan Would you be able to implement this ticket? Do we things which are unclear before implementation? |
I will look at it this week. |
Following-up on discussion in #488, now using https://github.com/Yelp/dumb-init as entrypoint so our kiwix-* tools properly receives signals
Following-up on discussion in #488, now using https://github.com/Yelp/dumb-init as entrypoint so our kiwix-* tools properly receives signals
Following-up on discussion in #488, now using https://github.com/Yelp/dumb-init as entrypoint so our kiwix-* tools properly receives signals
AFAIK, kiwix-serve has no signal management, leaving the microhttpd server started by libkiwix handling them.
When running on my computer, kiwix-serve properly exits on
INT
(^C
),QUIT
andTERM
.When running inside docker, none of those seem to have any impact. I always have to use
KILL
(which is handled by the system).FYI, in docker, when using
docker stop
, it emmits aSIGTERM
and waits for 10s until it usesSIGKILL
. It is possible to send any signal usingdocker kill -s {signal}
.This behavior is annoying (you have to wait 10s on stop –or specify a timeout, you can't use restart, etc) and seen only with kiwix-serve. I don't know what's going on but maybe catching signals on kiwix-serve and calling
Server::stop()
would help ?Note: I am using it with a full command and not a bash shortcut. PID is 1.
The text was updated successfully, but these errors were encountered: