From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add a module function to open a file descriptor connected to a pipe. Date: Thu, 26 Mar 2020 21:00:21 +0200 Message-ID: <83369v9c1m.fsf@gnu.org> References: <20200326163021.111847-1-phst@google.com> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="13052"; mail-complaints-to="usenet@ciao.gmane.io" Cc: phst@google.com, emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 26 20:01:13 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 1jHXkc-0003Hl-V5 for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Mar 2020 20:01:10 +0100 Original-Received: from localhost ([::1]:57776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHXkc-0002fA-0t for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Mar 2020 15:01:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54290) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHXk0-00023d-BS for emacs-devel@gnu.org; Thu, 26 Mar 2020 15:00:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jHXjz-0007vp-SK; Thu, 26 Mar 2020 15:00:31 -0400 Original-Received: from [176.228.60.248] (port=2547 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jHXju-0007sO-RX; Thu, 26 Mar 2020 15:00:28 -0400 In-Reply-To: <20200326163021.111847-1-phst@google.com> (message from Philipp Stephani on Thu, 26 Mar 2020 17:30:21 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:245816 Archived-At: > From: Philipp Stephani > Date: Thu, 26 Mar 2020 17:30:21 +0100 > Cc: Philipp Stephani > > This patch implements a function that adapts an existing pipe > process. That way, users can use familiar tools like process filters > or 'accept-process-output'. > > * src/module-env-28.h: Add 'open_channel' module function. > > * src/emacs-module.c (module_open_channel): Provide definition for > 'open_channel'. > (initialize_environment): Use it. > > * src/process.c (open_channel_for_module): New helper function. > (syms_of_process): Define necessary symbol. > > * test/src/emacs-module-tests.el (module/async-pipe): New unit test. > > * test/data/emacs-module/mod-test.c (signal_system_error): New helper > function. > (signal_errno): Use it. > (write_to_pipe): New function running in the background. > (Fmod_test_async_pipe): New test module function. > (emacs_module_init): Export it. > > * doc/lispref/internals.texi (Module Misc): Document new module > function. > > * doc/lispref/processes.texi (Asynchronous Processes): New anchor > for pipe processes. Thanks, but please also call out the change in NEWS.