On Fri, Aug 30, 2013 at 12:24 AM, Graham Murray <gra...@gmurray.org.uk> wrote:
> "Stefan G. Weichinger" <li...@xunil.at> writes:
>
>> Just found this note from Pacho on planet.gentoo.org:
>>
>> http://my.opera.com/pacho/blog/2013/08/27/how-to-write-proper-systemd-unit-files
>>
>> I will have to review some of my files then ;-)
>
> What I did not understand from reading that is why he (or gentoo policy)
> does not like 'type=forking'. Reading the systemd man files, I thought
> that type=forking would be the "natural" choice for most daemons.

On the contrary; with Type=simple systemd has better control on the
service, since systemd itself execv() the service binary, and it can
know precisely its PID and when it finishes. With Type=forking systemd
has to guess what the PID is, and therefore it nees more work to know
the status of the service. It does a pretty good job, but it's easier
with Type=simple.

Type=forking is there for old daemons that don't have a --foreground
or similar option.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply via email to