Tomas Volf wrote 4 weeks ago
(address . bug-guix@gnu.org)
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.