From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29368 invoked by alias); 14 Aug 2011 17:02:11 -0000 Received: (qmail 29360 invoked by uid 22791); 14 Aug 2011 17:02:10 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 14 Aug 2011 17:01:51 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7EH1eDI010981 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 14 Aug 2011 13:01:40 -0400 Received: from host1.jankratochvil.net (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7EH1cAP008498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Aug 2011 13:01:40 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p7EH1bfh027011; Sun, 14 Aug 2011 19:01:37 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p7EH1au9027010; Sun, 14 Aug 2011 19:01:36 +0200 Date: Sun, 14 Aug 2011 17:02:00 -0000 From: Jan Kratochvil To: Eli Zaretskii Cc: abhijit.k.halder@gmail.com, sergiodj@redhat.com, tromey@redhat.com, pedro@codesourcery.com, gdb-patches@sourceware.org Subject: Re: [PATCH] An implementation of pipe to make I/O communication between gdb and shell. [MinGW question] Message-ID: <20110814170136.GA26819@host1.jankratochvil.net> References: <20110813205053.GB22058@host1.jankratochvil.net> <20110814121407.GA29236@host1.jankratochvil.net> <83y5ywulun.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83y5ywulun.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-08/txt/msg00292.txt.bz2 On Sun, 14 Aug 2011 16:08:32 +0200, Eli Zaretskii wrote: > Where's the issue about which you need MinGW advice? http://sourceware.org/ml/gdb-patches/2011-08/msg00278.html On Sat, 13 Aug 2011 22:50:54 +0200, Jan Kratochvil wrote: # On Tue, 09 Aug 2011 12:42:25 +0200, Abhijit Halder wrote: # > + = pex_run (pipe->pex, # > + PEX_SEARCH | PEX_LAST | PEX_STDERR_TO_STDOUT, # # Why PEX_STDERR_TO_STDOUT? I am not so much against it but I do not see # a reason for it. # # # > + argv[0], argv, # # It does not work in one of the intended modes: # (gdb) pipe | print 1 | cat >/dev/null # cat: >/dev/null: No such file or directory # # You do not have to parse ARGV yourself, one can just run "/bin/sh", "-c", # COMMAND, NULL (sure no PEX_SEARCH needed then). > What exactly might not work? Abhijit Halder has suggested the suggested const char *argv[] = { "sh", "-c", "cat >/dev/null", NULL }; pex_run (pipe->pex, PEX_LAST, "/bin/sh", argv, NULL, NULL, &status); works on UNIX but it will probably not work on MinGW as there is no "/bin/sh", is it? The current implementation: const char *argv[] = { "cat", ">/dev/null", NULL }; pex_run (pipe->pex, PEX_SEARCH | PEX_LAST, "cat", argv, NULL, NULL, &status); produces that - therefore not working on UNIX: cat: >/dev/null: No such file or directory Thanks, Jan