GNU bug report logs - #61146
[PATCH Shepherd] doc: Update user services example for `services already running'.

Previous Next

Package: guix-patches;

Reported by: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Date: Sun, 29 Jan 2023 11:28:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Janneke Nieuwenhuizen <janneke <at> gnu.org>
Subject: bug#61146: closed (Re: bug#61146: [PATCH Shepherd] doc: Update
 user services example for `services already running'.)
Date: Sat, 04 Mar 2023 19:53:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#61146: [PATCH Shepherd] doc: Update user services example for `services already running'.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 61146 <at> debbugs.gnu.org.

-- 
61146: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61146
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Janneke Nieuwenhuizen <janneke <at> gnu.org>
Cc: Efraim Flashner <efraim <at> flashner.co.il>, 61146-done <at> debbugs.gnu.org
Subject: Re: bug#61146: [PATCH Shepherd] doc: Update user services example
 for `services already running'.
Date: Sat, 04 Mar 2023 20:51:52 +0100
Hi,

Janneke Nieuwenhuizen <janneke <at> gnu.org> skribis:

>>From de09ecb16b547830f0df1efc42c78affaaf9c9c4 Mon Sep 17 00:00:00 2001
> From: "Jan (janneke) Nieuwenhuizen" <janneke <at> gnu.org>
> Date: Sun, 29 Jan 2023 12:05:32 +0100
> Subject: [PATCH Shepherd] doc: Update user services example for `services
>  already running'.
>
> The previously suggested example now gives
>
>     Services already running, so not daemonizing.
>
> which is fixed by daemonizing right away.
>
> This is a follow-up to commit
>     3197c1c161d10b7f76771a2943f20fdafc5cc14a
>     service: 'daemonize' action does nothing when services are already running.
>
> * doc/shepherd.texi (Managing User Services): Daemonize before starting
> services.

Applied, thanks!

You’re right that the change in question should have been in ‘NEWS’.  I
guess I didn’t realize this could cause problems because in effect
daemonizing after child processes had been started would not work
correctly (shepherd wouldn’t receive SIGCHLD for those.)

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH Shepherd] doc: Update user services example for `services
 already running'.
Date: Sun, 29 Jan 2023 12:27:17 +0100
[Message part 4 (text/plain, inline)]
Hi,

I've been struggling with my home shepherd startup for a while,
wondering what changed, overlooking this new error message in the log.
Shouldn't this change have been mentioned in NEWS?  FWIW, this now
faulty example is also shown here

    https://guix.gnu.org/eo/blog/2020/gnu-shepherd-user-services/

Anyway, as the change was made quite some time ago I imagine that any
other users will have figured this out by now.

Greetings,
Janneke

[0001-doc-Update-user-services-example-for-services-alread.patch (text/x-patch, inline)]
From de09ecb16b547830f0df1efc42c78affaaf9c9c4 Mon Sep 17 00:00:00 2001
From: "Jan (janneke) Nieuwenhuizen" <janneke <at> gnu.org>
Date: Sun, 29 Jan 2023 12:05:32 +0100
Subject: [PATCH Shepherd] doc: Update user services example for `services
 already running'.

The previously suggested example now gives

    Services already running, so not daemonizing.

which is fixed by daemonizing right away.

This is a follow-up to commit
    3197c1c161d10b7f76771a2943f20fdafc5cc14a
    service: 'daemonize' action does nothing when services are already running.

* doc/shepherd.texi (Managing User Services): Daemonize before starting
services.
---
 doc/shepherd.texi | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index d25a8f2..538c334 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -13,7 +13,7 @@ Copyright @copyright{} @value{OLD-YEARS} Wolfgang J@"ahrling@*
 Copyright @copyright{} @value{NEW-YEARS} Ludovic Courtès@*
 Copyright @copyright{} 2020 Brice Waegeneire@*
 Copyright @copyright{} 2020 Oleg Pykhalov
-Copyright @copyright{} 2020 Jan (janneke) Nieuwenhuizen@*
+Copyright @copyright{} 2020, 2023 Jan (janneke) Nieuwenhuizen@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -1353,6 +1353,9 @@ load individual service definitions from
 (use-modules (shepherd service)
              ((ice-9 ftw) #:select (scandir)))
 
+;; Send shepherd into the background
+(action 'shepherd 'daemonize)
+
 ;; Load all the files in the directory 'init.d' with a suffix '.scm'.
 (for-each
   (lambda (file)
@@ -1361,8 +1364,6 @@ load individual service definitions from
            (lambda (file)
              (string-suffix? ".scm" file))))
 
-;; Send shepherd into the background
-(action 'shepherd 'daemonize)
 @end lisp
 
 Then, individual user services can be put in
-- 
2.38.1

[Message part 6 (text/plain, inline)]
-- 
Janneke Nieuwenhuizen <janneke <at> gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

This bug report was last modified 2 years and 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.