From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 2c79a8f 2/2: Use posix_spawn if possible. Date: Thu, 31 Dec 2020 22:36:25 +0200 Message-ID: <83ble9hfw6.fsf@gnu.org> References: <835z4qnhyx.fsf@gnu.org> <83y2hklqhg.fsf@gnu.org> <83wnx4lq3b.fsf@gnu.org> <83lfdegca1.fsf@gnu.org> <83h7o1hnpm.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31518"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 31 21:37:56 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kv4hn-00085k-24 for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 21:37:55 +0100 Original-Received: from localhost ([::1]:37912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kv4hm-0007ho-3b for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 15:37:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kv4gg-00066Z-BA for emacs-devel@gnu.org; Thu, 31 Dec 2020 15:36:46 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57064) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kv4gg-0001T0-45; Thu, 31 Dec 2020 15:36:46 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1629 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kv4ge-0002La-SL; Thu, 31 Dec 2020 15:36:45 -0500 In-Reply-To: (message from Philipp Stephani on Thu, 31 Dec 2020 21:24:50 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262207 Archived-At: > From: Philipp Stephani > Date: Thu, 31 Dec 2020 21:24:50 +0100 > Cc: Emacs developers > > > > 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)). That's strange, because every important feature using subprocesses that I frequently invoke seems to want PTY: gdb, ispell, flyspell-mode, compile, grep, man, shell... > > 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. But then we won't be able to benefit from posix_spawn, right?