You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Linux, when one of tee's outputs stops part-way (EFBIG under a file size limit, or ENOSPC), tee panics and the other outputs stop too:
$ seq 1 500000 | head -c 3145728 > in
$ prlimit --fsize=102400 env --ignore-signal=XFSZ tee capped /dev/null capped2 < in | wc -c
tee: capped: File too large
thread 'main' panicked at src/uu/tee/src/tee.rs:188:21:
assertion `left == right` failed: 2nd pipe should have enough spare
left: Ok(102400)
right: Ok(1048576)
1048576
The bytes the failed output didn't take are left in tee's pipe, so the assertion fails, and anything still being copied would get them. Here stdout stops after 1 MiB and capped2 stays empty. GNU 9.12 prints File too large for both capped files, writes 102400 bytes to each, and copies all 3145728 bytes to stdout.
This is unrelated with issue, but we can probably use prlimit binary at our Rust test directly since it is part of util-linux.
It is probably reasonable dependency more than strace.
Since limit() already applies the limit in the child, I don't think prlimit is needed here. It would also add a util-linux dependency, which macOS and the BSDs don't have.
Activity
oech3 commentedon Oct 6, 2026
This is unrelated with issue, but we can probably use
prlimitbinary at our Rust test directly since it is part ofutil-linux.It is probably reasonable dependency more than
strace.abendrothj commentedon Oct 6, 2026
Since
limit()already applies the limit in the child, I don't thinkprlimitis needed here. It would also add a util-linux dependency, which macOS and the BSDs don't have.oech3 commentedon Oct 6, 2026
Ah OK. The test is logically platforn independant.