emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 2c79a8f 2/2: Use posix_spawn if possible.


From: Philipp Stephani
Subject: Re: master 2c79a8f 2/2: Use posix_spawn if possible.
Date: Thu, 31 Dec 2020 21:24:50 +0100

Am Do., 31. Dez. 2020 um 18:47 Uhr schrieb Eli Zaretskii <eliz@gnu.org>:
>
> > From: Philipp Stephani <p.stephani2@gmail.com>
> > Date: Thu, 31 Dec 2020 18:36:47 +0100
> > Cc: Emacs developers <emacs-devel@gnu.org>
> >
> > > Maybe so, but are there enough use cases that need non-PTY
> > > subprocesses to make this worth our while?
> >
> > Most processes don't need a TTY. Only those that interact with the
> > user (shell, term, interactive compile, ...) do, but that's probably a
> > minority.
>
> I'm not sure it's a minority.  How about if you come up with a list of
> specific commands that launch subprocesses which don't need a PTY?

Such a list would be difficult to compile because the connection type
often depends on ambient state (the value of process-connection-type).
What I've done instead is
(1) counting the connection types in my current interactive session
doing "typical" work
(2) counting them in the Emacs unit test suite.
I don't know how representative that is, but in both cases pipe
processes significantly outnumbered pty processes (296 vs. 10 for (1)
and 831 vs. 122 for (2)). While this isn't very scientific, I think
it's at least some evidence that pipe processes are more common in
practice.

>
> > In particular, everything running in the background
> > (Flymake, VC...) doesn't
>
> These two maybe not, but I'm not so sure about what hides behind the
> ellipsis.
>
> But assuming you are right, you intend to audit all the places where
> we start a process and switch their :connection-type to nil if needed?

It's not needed (the default works fine in typical cases), the TTY
setup is just superfluous in many cases.

> Or change the default value of process-connection-type?

That's not very realistic. Well-written libraries ought to bind
process-connection-type to the value they prefer, but not all do.



reply via email to

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