Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: sysV/openrc init script vs. systemd .service file
Date: Tue, 12 Aug 2014 00:43:33
Message-Id: CAGfcS_moQt1yczRNPWSNGmz2Yh3aDyKHk1VjJN-cX6Y5H1VRww@mail.gmail.com
In Reply to: [gentoo-user] Re: sysV/openrc init script vs. systemd .service file by Grant Edwards
1 On Mon, Aug 11, 2014 at 5:55 PM, Grant Edwards
2 <grant.b.edwards@×××××.com> wrote:
3 >
4 > Thanks much for the advice.
5 >
6
7 Np. One other thing is that anybody using journald would probably
8 appreciate logging to stdout.
9
10 Forking with a PIDfile is actually a preferred mode of operation,
11 since then you know it is ready to accept connections.
12
13 Making sure the parent doesn't die is especially important if you do
14 things like timer units (basically a systemd version of cron). I
15 tended to fork off processes from scripts from cron and you can't do
16 that with systemd unless the parent waits for all the children to
17 finish. The better way to do it is just write multiple scripts and
18 let them start in parallel. When a parent dies, the unit is
19 considered done, and all its children are meticulously killed off.
20
21 Rich