From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AA40B13877A for ; Tue, 12 Aug 2014 00:43:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2CCEFE0C3A; Tue, 12 Aug 2014 00:43:26 +0000 (UTC) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D9998E0C0B for ; Tue, 12 Aug 2014 00:43:24 +0000 (UTC) Received: by mail-vc0-f180.google.com with SMTP id ij19so12426309vcb.39 for ; Mon, 11 Aug 2014 17:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=ZAu3leFCeB7Kp7TOAgXcncJkF87wjGecuDh7/Ai14VY=; b=DBJx408C+8J6OKlmNhMTPeVrqsUbc5c/PTO5iRibfQPBqzyOodnMriKJCC/gV4uWR1 8fj5GjP7uPO+J8tZOAOzhAXibKHoHfnfwXOvF93IqFHf2aCLnn5X54L0nPdL94I+7P+s ag6lBwO7N0LB9kv7PC0DKZYWAMRoBql3VsgnhKcTRm2pIvKE3QSdu+FY/zMCZmZQ9q1h 9IQg7xozjOdUe7XS4SbqgdhozaR6ezKhSe3KjDT7N7SKVVK9SwaidWlTxKXHkCE5zXdF PgvDorY2MLDM9Qc9CoqWhQoQzjCJCnwSU+pJb+wpbiMcT81xMR/1YPG1fSrFS2nKawBS 564w== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.52.28.231 with SMTP id e7mr2719094vdh.55.1407804203812; Mon, 11 Aug 2014 17:43:23 -0700 (PDT) Sender: freemanrich@gmail.com Received: by 10.52.8.229 with HTTP; Mon, 11 Aug 2014 17:43:23 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Aug 2014 20:43:23 -0400 X-Google-Sender-Auth: v9PdIT_ts1G9N9nQJxQK30mToMU Message-ID: Subject: Re: [gentoo-user] Re: sysV/openrc init script vs. systemd .service file From: Rich Freeman To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: c5d04f2c-f5d8-4af2-bd4d-879bc72df614 X-Archives-Hash: 8f7713b097ece43e29e5db6dad24e255 On Mon, Aug 11, 2014 at 5:55 PM, Grant Edwards wrote: > > Thanks much for the advice. > Np. One other thing is that anybody using journald would probably appreciate logging to stdout. Forking with a PIDfile is actually a preferred mode of operation, since then you know it is ready to accept connections. Making sure the parent doesn't die is especially important if you do things like timer units (basically a systemd version of cron). I tended to fork off processes from scripts from cron and you can't do that with systemd unless the parent waits for all the children to finish. The better way to do it is just write multiple scripts and let them start in parallel. When a parent dies, the unit is considered done, and all its children are meticulously killed off. Rich