From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Using file descriptors in Emacs Date: Sun, 11 Sep 2016 18:28:11 +0300 Message-ID: <83d1kabgms.fsf@gnu.org> References: <1465262706-5229-1-git-send-email-sbaugh@catern.com> <87twfevqu7.fsf@earth.catern.com> <87pood5fee.fsf@earth.catern.com> <834m5p83yy.fsf@gnu.org> <877fal56zh.fsf@earth.catern.com> <83d1kcaowk.fsf@gnu.org> <8737l86glg.fsf@earth.catern.com> <837fakan8b.fsf@gnu.org> <87r38s4xmv.fsf@earth.catern.com> <83oa3w8byt.fsf@gnu.org> <87twdn25ib.fsf@earth.catern.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1473607719 14096 195.159.176.226 (11 Sep 2016 15:28:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Sep 2016 15:28:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: sbaugh@catern.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 11 17:28:32 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bj6gC-00026Y-0P for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2016 17:28:24 +0200 Original-Received: from localhost ([::1]:38033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bj6gA-0002TX-4R for ged-emacs-devel@m.gmane.org; Sun, 11 Sep 2016 11:28:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bj6g4-0002TQ-6r for emacs-devel@gnu.org; Sun, 11 Sep 2016 11:28:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bj6g0-0003YX-1l for emacs-devel@gnu.org; Sun, 11 Sep 2016 11:28:15 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bj6fz-0003YT-Ud; Sun, 11 Sep 2016 11:28:11 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1136 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bj6fy-0002sQ-Te; Sun, 11 Sep 2016 11:28:11 -0400 In-reply-to: <87twdn25ib.fsf@earth.catern.com> (sbaugh@catern.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207362 Archived-At: > From: sbaugh@catern.com > Date: Sat, 10 Sep 2016 10:28:44 -0400 > > > Please elaborate: how are file descriptors required for that? A shell > > needs to pass file descriptors to the subprocesses it invokes, which > > AFAIK we already do in the primitives that invoke subprocesses. What > > else is needed, and how does the feature you propose fit into that? > > Two features that I would like to add to eshell (or some shell in Emacs) > that I believe will require the ability to directly manipulate file > descriptors: > > - Piping data to and from processes without that data round-tripping through > Emacs, which is necessary if I want to write a pipeline processing any > significant amount of data (which I frequently do in even casual shell > use) > - Redirecting higher file descriptors than 0/1/2 (that is, when creating > a process, before forking, use dup2 to rearrange what file descriptors are > in what slots) > > Of the two, the first is more important, but I think the second is also > necessary. It sounds like none of these two features need file descriptors to be exposed to Lisp. Both of these sound like extensions of start-process, and the descriptors could be dealt with entirely on the C level, as applications shouldn't care about them. Am I missing something?