Bug#833559: systemd user service standard output is not line-buffered

Felipe Sateler fsateler at debian.org
Fri Aug 5 23:35:36 BST 2016


Control: tags -1 moreinfo

On 5 August 2016 at 18:22, Daniel Kahn Gillmor <dkg at fifthhorseman.net> wrote:
> 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.

Does it appear in the journal at all (ie, without any filters)? What
do you mean by "when I would expect it to"?

> 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.


I'm not fully sure of what you mean, but this looks like
https://github.com/systemd/systemd/issues/2913.

-- 

Saludos,
Felipe Sateler



More information about the Pkg-systemd-maintainers mailing list