coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

tac: yes ""|tac - file should show content of file without SIGPIPE

Open oech3 opened this issue 3 weeks ago • 8 comments

$  echo -e "1\n2\n3" > /tmp/3
$ yes ""|gnu-tac - /tmp/3
gnu-tac: /tmp/cutmpBYd5Ra: write error: Disk quota exceeded
3
2
1
$ yes ""|uu-tac - /tmp/3
fish: Process 1544, 'uu-tac' from job 1, 'yes ""|uu-tac - /tmp/3' terminated by signal SIGKILL (Forced quit)

oech3 avatar Dec 07 '25 12:12 oech3

@pixelb Does this simplify tests/tac/tac-continue.sh? Related with #9590 . cc: @martinkunkel2

oech3 avatar Dec 07 '25 12:12 oech3

Well actually filling /tmp is dangerous on a normal machine. I'll probably adjust tac-continue.sh to be a root test that creates a small file system

pixelb avatar Dec 07 '25 12:12 pixelb

Small FS based test would not work with uutils/tac as not using tmpfs. How about systemd-run?

Ofcause GNU's test suite is something for GNU coreutls, not uutils. But what can uutils do to test this?

oech3 avatar Dec 07 '25 13:12 oech3

Well $TMPDIR is part of the interface for tac, split, sort. I.e., would ideally be supported by uutils. How does uutils handle temp storage then for this use case?

pixelb avatar Dec 07 '25 13:12 pixelb

Maybe, everything in RAM? (predicted from #9592).

oech3 avatar Dec 07 '25 13:12 oech3

Right, unbounded RAM usage is a bug, and generally TMPDIR has better constraints in place, or has more capacity than RAM

pixelb avatar Dec 07 '25 14:12 pixelb

I'll probably adjust tac-continue.sh to be a root test that creates a small file system

Done in https://github.com/coreutils/coreutils/commit/3c9d4fdd83ca1e13d001ef160301c10eb5de50c6

pixelb avatar Dec 07 '25 14:12 pixelb

I guess uutils will switch to hybrid for performance.

oech3 avatar Dec 07 '25 14:12 oech3