[systemd-devel] How to handle daemon which takes some minutes to terminate?
baldur at email.de
Mon Apr 25 05:41:23 PDT 2011
i have a daemon (ice generator) which behaves a little bit different than
normal daemons. The icegeneratord daemon, provides me with an mp3 stream.
Whenever i send a kill signal (TERM/HUP) this deamon will terminate
eventually, however it will terminate after it has played the last song
fully. Depending on where i am this can take up to 3 minutes before the
daemon goes down - this is in order not interrupt plaing songs abruptly
However this kind of behaviour seems not be well interacting with systems,
it hangs for some time when i issue an stop service. and than reports the
service as failed, because the daemon simply catches alls signals and ends
when the current song is finished - which seems to long for systems.
What should i do in such a case?
More information about the systemd-devel