[systemd-devel] How to handle daemon which takes some minutes to terminate?

Kay Sievers kay.sievers at vrfy.org
Mon Apr 25 10:24:35 PDT 2011


On Mon, Apr 25, 2011 at 14:41, Baldur <baldur at email.de> wrote:
> 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
> for listeners.
>
> 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?

Add:
  TimeoutSec=
to the service file?

Kay


More information about the systemd-devel mailing list