GNU bug report logs -
#76244
Shepherd does not support UTF-8 in the log output
Previous Next
Reported by: Tomas Volf <~@wolfsden.cz>
Date: Wed, 12 Feb 2025 23:48:02 UTC
Severity: normal
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 76244 <at> debbugs.gnu.org (full text, mbox):
Hi,
Tomas Volf <~@wolfsden.cz> skribis:
> $ herd spawn transient -- $(which sh) -c 'echo "猫"'
> Spawning transient service for ("/run/current-system/profile/bin/sh" "-c" "echo \"???\"").
Actually, it’s not logging, it’s the command itself that’s not
interpreted as UTF-8:
--8<---------------cut here---------------start------------->8---
$ cat /tmp/t.sh
#!/bin/sh
echo "猫"
$ sudo herd spawn transient /tmp/t.sh
Spawning transient service for ("/tmp/t.sh").
Service user-homes has been started.
Starting service transient-375...
Service transient-375 started.
Service transient-375 running with value #<<process> id: 12840 command: ("/tmp/t.sh")>.
Service transient-375 has been started.
$ sudo herd status root
● Status of root:
It is running since Mon 10 Feb 2025 08:38:03 AM CET (3 days ago).
Main PID: 1
Command: /gnu/store/n87px1cazqkav83npg80ccp1n777j08s-guile-3.0.9/bin/guile --no-auto-compile /gnu/store/ci2c9iwqaa1zpr38wc58419m9yh8g798-shepherd-1.0.99-git/bin/shepherd --config /gnu/store/6c9xhch8vqddwl81qj28d7c7k6zwr4ms-shepherd.conf
It is enabled.
Provides: root shepherd
Custom actions: help status halt power-off kexec load eval unload reload daemonize restart
Will not be respawned.
Recent messages (use '-n' to view more or less):
2025-02-13 10:45:45 Service transient-375 running with value #<<process> id: 12840 command: ("/tmp/t.sh")>.
2025-02-13 10:45:45 Service transient-375 has been started.
2025-02-13 10:45:45 [t.sh] 猫
2025-02-13 10:45:45 Service transient-375 has been disabled.
2025-02-13 10:45:45 Transient service transient-375 terminated, now unregistered.
--8<---------------cut here---------------end--------------->8---
Well there’s also a problem with logging after all:
--8<---------------cut here---------------start------------->8---
$ sudo tail -4 /var/log/messages
2025-02-13 10:45:45 localhost shepherd[1]: Service transient-375 has been started.
2025-02-13 10:45:45 localhost shepherd[1]: [t.sh] ?
2025-02-13 10:45:45 localhost shepherd[1]: Service transient-375 has been disabled.
2025-02-13 10:45:45 localhost shepherd[1]: Transient service transient-375 terminated, now unregistered.
--8<---------------cut here---------------end--------------->8---
I’m surprised because I’m pretty sure there are tests for that. I’ll
check later.
Ludo’.
This bug report was last modified 141 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.