On Sat, May 28, 2022 at 08:32:57PM +0200, Markus Wichmann wrote:
> ultimately terminates on the terminal. But who knows if that is the
> case? Pipelines ending in a call to "less" will terminate on the
> terminal, pipelines ending in a call to "nc" will not. So the shell
> can't know, only the last
On Sat, May 28, 2022 at 07:19:24PM +, Rodrigo Martins wrote:
> 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 acro
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 clea
On Sat, May 28, 2022 at 06:09:04PM +, Hadrien Lacour wrote:
> Now, I wonder how it'd be fixed ("it" being how does the read end of the pipe
> signal to the write one the kind of buffering it wants) in a perfect world.
The problem ultimately stems from the mistaken idea that buffering is
invisi
On Sat, May 28, 2022 at 07:58:40PM +0200, Markus Wichmann wrote:
> > You can use stdbuf(1) to modify that aspect without touching the
> > program source itself.
> >
>
> Had to look up the source for that. I had heard of stdbuf, but I always
> thought that that was impossible. How can one process ch
On Sat, May 28, 2022 at 08:38:49AM +, Hadrien Lacour wrote:
> On Sat, May 28, 2022 at 03:33:16AM +, Rodrigo Martins wrote:
> > Hello,
> >
> > The problem here is I/O buffering. I suspect it to happen in the C
> > standard library, specifically on the printf function family.
You know, that
On Sat, May 28, 2022 at 03:33:16AM +, Rodrigo Martins wrote:
> Hello,
>
> The problem here is I/O buffering. I suspect it to happen in the C standard
> library, specifically on the printf function family. If I recall, the C
> standard says stdio is line-buffered when the file is an interactiv
Hello,
The problem here is I/O buffering. I suspect it to happen in the C standard
library, specifically on the printf function family. If I recall, the C
standard says stdio is line-buffered when the file is an interactive device and
let's it be fully buffered otherwise. This is likely why you