GNU bug report logs - #76243
[shepherd] Lines not ending in #\newline are not logged

Previous Next

Package: guix;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Wed, 12 Feb 2025 23:43:01 UTC

Severity: normal

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: Tomas Volf <~@wolfsden.cz>
Subject: bug#76243: closed (Re: bug#76243: [shepherd] Lines not ending in
 #\newline are not logged)
Date: Wed, 26 Feb 2025 16:36:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#76243: [shepherd] Lines not ending in #\newline are not logged

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

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

-- 
76243: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76243
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: Tomas Volf <~@wolfsden.cz>
Cc: 76243-done <at> debbugs.gnu.org
Subject: Re: bug#76243: [shepherd] Lines not ending in #\newline are not logged
Date: Wed, 26 Feb 2025 17:34:36 +0100
Tomas Volf <~@wolfsden.cz> skribis:

> When you execute the following code:
>
> herd spawn transient -- $(which sh) -c 'printf x'
>
>
> The `x' is nowhere to be found in the log:

Fixed in bf996702af39f679e896cb745c6c11516cce94bc.

[Message part 3 (message/rfc822, inline)]
From: Tomas Volf <~@wolfsden.cz>
To: bug-guix <at> gnu.org
Subject: [shepherd] Lines not ending in #\newline are not logged
Date: Thu, 13 Feb 2025 00:42:38 +0100
Hi :)

When you execute the following code:

--8<---------------cut here---------------start------------->8---
herd spawn transient -- $(which sh) -c 'printf x'
--8<---------------cut here---------------end--------------->8---

The `x' is nowhere to be found in the log:

--8<---------------cut here---------------start------------->8---
Feb 12 23:39:12 localhost shepherd[1]: Starting service transient-249... 
Feb 12 23:39:12 localhost shepherd[1]: Service transient-249 started. 
Feb 12 23:39:12 localhost shepherd[1]: Service transient-249 running with value #<<process> id: 1262 command: ("/run/current-system/profile/bin/sh" "-c" "printf x")>. 
Feb 12 23:39:12 localhost shepherd[1]: Service transient-249 has been started. 
Feb 12 23:39:12 localhost shepherd[1]: Service transient-249 has been disabled. 
Feb 12 23:39:12 localhost shepherd[1]: Transient service transient-249 terminated, now unregistered. 
--8<---------------cut here---------------end--------------->8---

When you add an extra echo:

--8<---------------cut here---------------start------------->8---
herd spawn transient -- $(which sh) -c 'printf x; echo'
--8<---------------cut here---------------end--------------->8---

The `x' will be in the log:

--8<---------------cut here---------------start------------->8---
Feb 12 23:40:10 localhost shepherd[1]: Starting service transient-250... 
Feb 12 23:40:10 localhost shepherd[1]: Service transient-250 started. 
Feb 12 23:40:10 localhost shepherd[1]: Service transient-250 running with value #<<process> id: 1280 command: ("/run/current-system/profile/bin/sh" "-c" "printf x; echo")>. 
Feb 12 23:40:10 localhost shepherd[1]: Service transient-250 has been started. 
Feb 12 23:40:10 localhost shepherd[1]: sh[1280] x 
Feb 12 23:40:10 localhost shepherd[1]: Service transient-250 has been disabled. 
Feb 12 23:40:10 localhost shepherd[1]: Transient service transient-250 terminated, now unregistered. 
--8<---------------cut here---------------end--------------->8---

While the current behavior might be strictly speaking valid (Does
Shepherd actually specify that it only operates on text files?), having
the output in the log in both cases would be better in my opinion.

Have a nice day,
Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.



This bug report was last modified 142 days ago.

Previous Next


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