From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: pipe Date: Fri, 13 Mar 2015 16:54:58 +0200 Message-ID: <83pp8d2bi5.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1426258539 16995 80.91.229.3 (13 Mar 2015 14:55:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Mar 2015 14:55:39 +0000 (UTC) Cc: ueno@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 13 15:55:32 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YWQzm-00014Q-5q for ged-emacs-devel@m.gmane.org; Fri, 13 Mar 2015 15:55:26 +0100 Original-Received: from localhost ([::1]:37278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWQzg-0003wQ-Kv for ged-emacs-devel@m.gmane.org; Fri, 13 Mar 2015 10:55:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWQzS-0003tc-WB for emacs-devel@gnu.org; Fri, 13 Mar 2015 10:55:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWQzO-0005cw-VS for emacs-devel@gnu.org; Fri, 13 Mar 2015 10:55:06 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:37740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWQzO-0005Yc-N6; Fri, 13 Mar 2015 10:55:02 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NL500J00O0KOS00@a-mtaout21.012.net.il>; Fri, 13 Mar 2015 16:55:01 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NL500JLAO3OM360@a-mtaout21.012.net.il>; Fri, 13 Mar 2015 16:55:01 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183847 Archived-At: > From: Stefan Monnier > Date: Fri, 13 Mar 2015 08:45:17 -0400 > Cc: emacs-devel@gnu.org >=20 > This said, I know nothing about w32's API in this regard, so maybe = your > suggestion could work. I certainly hope so. I just said that I didn't know about a way, but that doesn't mean it doesn't exist. AFAIK, the only way to pass redirected files beyond the 3 standard ones to subprocesses on Windows is via file handles (which are actually pointers in disguise). Handles to kernel objects are system-global on Windows, so you can make a handle inheritable, and then pass its value to the subprocess as a command-line argument; the subprocess then should convert it to a Posix-style file descriptor by calling a function. But for this to work vis-=E0-vis gpg, the Windows port of gpg should perform its part of this dance: it should know it accepts handles (which could be 64-bit wide in 64-bit builds) instead of file descriptors, and it should convert them to file descriptors before using them as it would on Unix.