worth including a link to the follow up, in which mjd finds the existing tools (like /u/edwintorok mentions) and approaches in other OS’s.
An alternative to the pseudo-tty-pipe program would be stdbuf -oL, it uses LD_PRELOAD instead of creating a new pty and then calls setvbuf to change the buffering mode of standard streams. Not a very elegant way, but it works.
pseudo-tty-pipe
stdbuf -oL
setvbuf
worth including a link to the follow up, in which mjd finds the existing tools (like /u/edwintorok mentions) and approaches in other OS’s.
An alternative to the
pseudo-tty-pipe
program would bestdbuf -oL
, it uses LD_PRELOAD instead of creating a new pty and then callssetvbuf
to change the buffering mode of standard streams. Not a very elegant way, but it works.