Hello, Markus,
Thank for filling in the details. I should do more research next time.
I tried to write a program that does the same as stdbuf(1), but using setbuf(3). Unfortunately it seems the buffering mode is reset across exec(3), since my program did not work. If it did that would be a clean solution.
Does the buffering happen on the input or on the output side? Or it that not the right way to look at it? Are these programs doing something wrong or is this a limitation by the specifications?
Is modifying each program the best solutions we have? Granted it is not an invasive change, especially for simple pipeline-processing programs, but making such extensions could bring portability issues.
Rodrigo.
Received on Sat May 28 2022 - 21:19:24 CEST