Here’s an odd one: When I chain multiple pipes inside of a container, the producer hangs indefinitely instead of exiting when the consumers stop consuming.
As a concrete example,
# yes | fold | head -n 1 y
Prints one “y” and then halts on the host, as expected. But inside of a container, this command prints one “y”, but never exits. top shows that fold is locked at 100% single-core CPU usage. Neither the shell nor the base image seem to make a difference - I have tried various combinations of Debian, Ubuntu, bash, sh, and dash.
This is version 3.18 on Fedora, installed with snap. I’d like to figure out what’s going on because this behavior breaks shell scripts.