emacs-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]