[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PTYs vs. pipes for subprocesses [was: Tramp and conversion of \r\n into
From: |
tomas |
Subject: |
PTYs vs. pipes for subprocesses [was: Tramp and conversion of \r\n into \n] |
Date: |
Sun, 8 Aug 2021 08:13:39 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
another thing which has bitten me going from PTYs to pipes
(specifically because I wanted to have stderr in a separate
channel - that part worked nicely), is that the callee "sees"
that, thinks "oh, I'm not being called interactively [1] and
disables line buffering.
Interactivity goes out of the window. Not always welcome :-)
I "solved" that by invoking the callee through stdbuf. I didn't
know this even existed before. And it's ugly [2] and won't work
always. I don't dare yet to use that in other than toy applications
(and, of course, to get yourself out of the occasional hard
spot).
Cheers
[1] probably the classical isatty(3) dance.
[2] it basically works by sneaking itself into LD_PRELOAD
Not that I'm not thankful for someone providing that,
mind you. But it's not the typical "for production"
thing, I'd say.
- t
signature.asc
Description: Digital signature
- Re: Tramp and conversion of \r\n into \n, Thomas Ross, 2021/08/05
- Re: Tramp and conversion of \r\n into \n, Eli Zaretskii, 2021/08/05
- Re: Tramp and conversion of \r\n into \n, Stefan Monnier, 2021/08/05
- Re: Tramp and conversion of \r\n into \n, Michael Albinus, 2021/08/05
- Re: Tramp and conversion of \r\n into \n, Stefan Monnier, 2021/08/05
- Re: Tramp and conversion of \r\n into \n, Michael Albinus, 2021/08/06
- Re: Tramp and conversion of \r\n into \n, Stefan Monnier, 2021/08/06
- Re: Tramp and conversion of \r\n into \n, Michael Albinus, 2021/08/07
- Re: Tramp and conversion of \r\n into \n, Stefan Monnier, 2021/08/07
- PTYs vs. pipes for subprocesses [was: Tramp and conversion of \r\n into \n],
tomas <=
- Re: Tramp and conversion of \r\n into \n, Michael Albinus, 2021/08/08
- Re: Tramp and conversion of \r\n into \n, Michael Albinus, 2021/08/12
- Re: Tramp and conversion of \r\n into \n, Michael Albinus, 2021/08/13
- Re: Tramp and conversion of \r\n into \n, Thomas Ross, 2021/08/07