View Single Post
Old 02-26-2024, 10:54 AM   #272
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Ooh, that's interesting .

The fifo is purged via a dumb read in a poll loop. It turns out that, in this case, by the time we get to the read, everything has already been written, and so read will read the whole string of data (e.g., `1\n2\n3\n...`), and that gets fed to fbink in a *single* print call.

That allows it to blow past the line limit, since that only applies to *consecutive* print calls.

I'm... sort of torn on whether I really want to do something about it.

I kind of *like* the fact that you can pass LFs to blow past the limit, but it does create a bit of an inconsistency, depending on the timing...

EDIT: This means that doing something like `for i in $(seq 1 1 30);do echo $i >| /tmp/fbink-fifo && usleep 500;done` instead *will* behave as expected .

Last edited by NiLuJe; 02-26-2024 at 11:24 AM.
NiLuJe is offline   Reply With Quote