Linux bluetooth development
 help / color / mirror / Atom feed
* [bluez/bluez] 361fbb: mpris-proxy: Line-buffer stdout
@ 2026-09-29  1:15 Seonggon, Cho
  0 siblings, 0 replies; only message in thread
From: Seonggon, Cho @ 2026-09-29  1:15 UTC (permalink / raw)
  To: linux-bluetooth

  Branch: refs/heads/1175670
  Home:   https://github.com/bluez/bluez
  Commit: 361fbb38d786522b7a2add85b4d656b5e5cd49da
      https://github.com/bluez/bluez/commit/361fbb38d786522b7a2add85b4d656b5e5cd49da
  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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-29  1:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29  1:15 [bluez/bluez] 361fbb: mpris-proxy: Line-buffer stdout Seonggon, Cho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox