Linux bluetooth development
 help / color / mirror / Atom feed
From: "Seonggon, Cho" <noreply@github.com>
To: linux-bluetooth@vger.kernel.org
Subject: [bluez/bluez] b0e1cb: mpris-proxy: Line-buffer stdout
Date: Mon, 28 Sep 2026 23:58:32 -0700	[thread overview]
Message-ID: <bluez/bluez/push/refs/heads/1175715/000000-b0e1cb@github.com> (raw)

  Branch: refs/heads/1175715
  Home:   https://github.com/bluez/bluez
  Commit: b0e1cb166c363cdba07910caac8f8d436ac8cdf4
      https://github.com/bluez/bluez/commit/b0e1cb166c363cdba07910caac8f8d436ac8cdf4
  Author: Seonggon Cho <jmsmg1@me.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M tools/mpris-proxy.c

  Log Message:
  -----------
  mpris-proxy: Line-buffer stdout

mpris-proxy reports adapter and player changes with printf() but never
flushes stdout. When it runs as a service (tools/mpris-proxy.service)
stdout is a pipe to the journal, so glibc fully buffers it and nothing
is written until 4 KiB have accumulated or the process exits.

On a system whose Bluetooth adapter went away and came back every two
minutes, the "Bluetooth Adapter /org/bluez/hci0 removed" and "... found"
messages reached the journal in bursts of exactly 100 lines (about
4096 bytes), all carrying the timestamp of the flush rather than of the
event, i.e. up to about 80 minutes late.

Set stdout to line buffered at startup, as bt_shell_init() already does,
so every message reaches the journal with an accurate timestamp.

Assisted-by: Claude:claude-fable-5-1



To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications

                 reply	other threads:[~2026-09-29  6:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bluez/bluez/push/refs/heads/1175715/000000-b0e1cb@github.com \
    --to=noreply@github.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox