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

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal

Debbugs page

Tomas Volf wrote 4 weeks ago
(address . bug-guix@gnu.org)
87v7teafwx.fsf@wolfsden.cz
Hi :)

When you execute the following code:

Toggle snippet (3 lines)
herd spawn transient -- $(which sh) -c 'printf x'

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

Toggle snippet (8 lines)
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.

When you add an extra echo:

Toggle snippet (3 lines)
herd spawn transient -- $(which sh) -c 'printf x; echo'

The `x' will be in the log:

Toggle snippet (9 lines)
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.

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.
Ludovic Courtès wrote 2 weeks ago
(name . Tomas Volf)(address . ~@wolfsden.cz)(address . 76243-done@debbugs.gnu.org)
8734g03bs3.fsf@gnu.org
Tomas Volf <~@wolfsden.cz> skribis:

Toggle quote (7 lines)
> 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.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76243@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76243
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help