Bug#833559: systemd user service standard output is not line-buffered
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Fri Aug 5 23:22:30 BST 2016
Package: systemd
Version: 230-7
Severity: normal
I've tested the following short-lived "daemon" as a systemd user service:
-------
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv)
{
sleep(5);
printf("a test\n");
sleep(10);
return 0;
}
-------
the "a test" line doesn't show up in the user journal when i would
expect it to. it appears that stdout is not line-buffered.
stderr, on the other hand, does appear to be line-buffered --
newline-terminated strings written to stderr show up immediately in
the journal.
i'd expect both stdout and stderr to be line-buffered.
--dkg
-- Package-specific info:
-- System Information:
Debian Release: stretch/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'testing'), (200, 'unstable-debug'), (200, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.7.0-rc7-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages systemd depends on:
ii adduser 3.115
ii libacl1 2.2.52-3
ii libapparmor1 2.10.95-4
ii libaudit1 1:2.6.5-1
ii libblkid1 2.28-6
ii libc6 2.23-4
ii libcap2 1:2.25-1
ii libcap2-bin 1:2.25-1
ii libcryptsetup4 2:1.7.0-2
ii libgcrypt20 1.7.2-2
ii libgpg-error0 1.24-1
ii libidn11 1.33-1
ii libkmod2 22-1.1
ii liblzma5 5.1.1alpha+20120614-2.1
ii libmount1 2.28-6
ii libpam0g 1.1.8-3.3
ii libseccomp2 2.3.1-2
ii libselinux1 2.5-3
ii libsystemd0 230-7
ii mount 2.28-6
ii util-linux 2.28-6
Versions of packages systemd recommends:
ii dbus 1.10.8-1
ii libpam-systemd 230-7
Versions of packages systemd suggests:
ii policykit-1 0.105-16
ii systemd-container 230-7
pn systemd-ui <none>
Versions of packages systemd is related to:
ii udev 230-7
-- no debconf information
More information about the Pkg-systemd-maintainers
mailing list