pw-link --monitor seems to not flush its prints
- PipeWire version (
pipewire --version
): 0.3.45 - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Arch Linux - Desktop Environment: i3
- Kernel version (
uname -r
): 5.16.5-arch1-1
Description of Problem:
Sorry about using a release pipewire version, but I'm somewhat confident this issue still exists on master, as there has been few changes in pw-link recently. And I couldn't get pipewire-git from the AUR to build.
The following two commands do not behave similarly:
pw-link -mio
pw-link -mio | while read line; do echo $line; done
The first one prints out connected/disconnected devices (or nodes? I'm not 100% with the terms yet) as they happen, the second one prints out nothing until you ctrl+c, and only then prints out everything. With pw-link -mio | xargs -n1 echo
, it just doesn't print anything at all.
Maybe there's some buffering going on, if stdout is piped?
How Reproducible:
Very consistent. I can't seem to find any way to redirect the output of pw-link -m
so that I would be able to process it line by line, as it prints out the lines.
Steps to Reproduce:
- Run
pw-link -mio
, and observe how many lines get printed right away. - Run
pw-link -mio | while read line; do echo $line; done
, and observe how nothing gets printed. - Interrupt by pressing ctrl+c, and observe how the lines get printed now.
Actual Results:
Piping the output of pw-link seems to make it not print out anything.
Expected Results:
For the lines printed by pw-link to get piped into whatever is waiting on the other side of the pipe in a timely fashion.