ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Sergei Epiphanov <serpiph@nikiet.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Нужно небольшое пояснение по *.service
Date: Tue, 14 May 2013 13:58:04 +0400
Message-ID: <2215505.BPxTyMbO5r@epiphanov.bkpi82.nikiet.ru> (raw)
In-Reply-To: <1114696387.23460.1368523790726.JavaMail.root@ilimnet.ru>

On 14 мая 2013 09:29 Такасеев Алексей Геннадиевич wrote:
...
> Запускается все замечательно, а вот с остановом возникла серьезная проблема
> - systemd просто убивает все процессы, что не есть правильно, ибо по zimbra
> stop выполняется пароход и небольшая баржа всяких действий.
> 
> Подскажите, плз, как заставить systemd дожаться завершения
> /etc/rc.d/init.d/zimbra stop, и только потом продолжить свои действия?

При остановке сервиса systemd сначала выполняет строки ExecStop=. Если их 
выполнение не укладывается в TimeoutSec= или TimeoutStopSec=, то вызывается 
KillSignal= (если это разрешено SendSIGKILL=), а затем завершает всё 
прибиваением процессов (в зависимости от KillMode=).

Во-первых, есть параметры (man systemd.service)

TimeoutSec=
TimeoutStopSec=

Если их указать равными нулю, то systemd не будет принудительно убивать 
процессы по истечении времени. Также есть параметр (man systemd.kill)

KillMode=

который позволяет не прибивать принудительно процессы при завершении сервиса 
по таймауту.

-- 
С уважением, Епифанов Сергей

      reply	other threads:[~2013-05-14  9:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-14  9:29 ` Такасеев Алексей Геннадиевич
2013-05-14  9:58   ` Sergei Epiphanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2215505.BPxTyMbO5r@epiphanov.bkpi82.nikiet.ru \
    --to=serpiph@nikiet.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git