From: <tomas@tuxteam.de>
To: emacs-devel@gnu.org
Subject: PTYs vs. pipes for subprocesses [was: Tramp and conversion of \r\n into \n]
Date: Sun, 8 Aug 2021 08:13:39 +0200 [thread overview]
Message-ID: <20210808061339.GB19428@tuxteam.de> (raw)
In-Reply-To: <jwvy29chq6h.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 846 bytes --]
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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2021-08-08 6:13 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 7:46 Tramp and conversion of \r\n into \n APEL Martin
2020-12-11 9:15 ` Michael Albinus
2020-12-11 9:59 ` APEL Martin
2020-12-11 10:26 ` Michael Albinus
2020-12-11 11:29 ` APEL Martin
2020-12-11 11:52 ` Michael Albinus
2020-12-13 16:04 ` Michael Albinus
2020-12-15 11:37 ` Michael Albinus
2020-12-15 12:45 ` APEL Martin
2020-12-15 14:37 ` Michael Albinus
2020-12-15 18:45 ` Michael Albinus
2020-12-16 6:44 ` APEL Martin
2020-12-16 15:34 ` Michael Albinus
2020-12-16 15:55 ` APEL Martin
2020-12-17 11:35 ` APEL Martin
2020-12-17 12:50 ` Michael Albinus
2020-12-18 7:48 ` APEL Martin
2020-12-18 12:35 ` Michael Albinus
2020-12-18 12:56 ` APEL Martin
2020-12-18 13:04 ` Michael Albinus
2020-12-18 14:54 ` APEL Martin
2020-12-18 15:00 ` Michael Albinus
2020-12-18 15:10 ` APEL Martin
2020-12-18 15:18 ` Michael Albinus
2020-12-22 14:57 ` Michael Albinus
2021-01-07 11:13 ` APEL Martin
2020-12-19 9:18 ` yyoncho
2020-12-19 16:48 ` Michael Albinus
2020-12-20 14:03 ` Michael Albinus
2021-08-05 1:46 ` Thomas Ross
2021-08-05 6:16 ` Eli Zaretskii
2021-08-07 2:08 ` Thomas Ross
2021-08-05 14:10 ` Stefan Monnier
2021-08-05 15:40 ` Michael Albinus
2021-08-05 16:25 ` Stefan Monnier
2021-08-06 7:13 ` Michael Albinus
2021-08-06 14:46 ` Stefan Monnier
2021-08-07 13:51 ` Michael Albinus
2021-08-07 22:04 ` Stefan Monnier
2021-08-08 6:13 ` tomas [this message]
2021-08-08 14:25 ` Michael Albinus
2021-08-12 18:47 ` Michael Albinus
2021-08-13 12:16 ` Michael Albinus
2021-08-07 2:07 ` Thomas Ross
2021-08-07 13:54 ` Michael Albinus
2021-08-08 14:29 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210808061339.GB19428@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).