Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] looking for a couple of systemd units
Date: Fri, 30 Aug 2013 05:35:20
Message-Id: CADPrc80tyNcDic4CYoM1JowYJQn6j9RStdS2GkWDA4k9S5+Cpg@mail.gmail.com
In Reply to: Re: [gentoo-user] looking for a couple of systemd units by Graham Murray
1 On Fri, Aug 30, 2013 at 12:24 AM, Graham Murray <graham@×××××××××××.uk> wrote:
2 > "Stefan G. Weichinger" <lists@×××××.at> writes:
3 >
4 >> Just found this note from Pacho on planet.gentoo.org:
5 >>
6 >> http://my.opera.com/pacho/blog/2013/08/27/how-to-write-proper-systemd-unit-files
7 >>
8 >> I will have to review some of my files then ;-)
9 >
10 > What I did not understand from reading that is why he (or gentoo policy)
11 > does not like 'type=forking'. Reading the systemd man files, I thought
12 > that type=forking would be the "natural" choice for most daemons.
13
14 On the contrary; with Type=simple systemd has better control on the
15 service, since systemd itself execv() the service binary, and it can
16 know precisely its PID and when it finishes. With Type=forking systemd
17 has to guess what the PID is, and therefore it nees more work to know
18 the status of the service. It does a pretty good job, but it's easier
19 with Type=simple.
20
21 Type=forking is there for old daemons that don't have a --foreground
22 or similar option.
23
24 Regards.
25 --
26 Canek Peláez Valdés
27 Posgrado en Ciencia e Ingeniería de la Computación
28 Universidad Nacional Autónoma de México