From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13977 invoked by alias); 16 Sep 2011 13:20:16 -0000 Received: (qmail 13964 invoked by uid 22791); 16 Sep 2011 13:20:14 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_CL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Sep 2011 13:20:01 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R4YKl-0006Ti-Qw from pedro_alves@mentor.com ; Fri, 16 Sep 2011 06:20:00 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Sep 2011 14:19:57 +0100 From: Pedro Alves To: Tristan Gingold Subject: Re: [RFA] Preliminary work in fork_inferior Date: Fri, 16 Sep 2011 14:38:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; x86_64; ; ) Cc: "gdb-patches@sourceware.org ml" References: <201109071409.06452.pedro@codesourcery.com> <8B49B563-BE0B-452C-8956-31E00A880D96@adacore.com> In-Reply-To: <8B49B563-BE0B-452C-8956-31E00A880D96@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109161419.55173.pedro@codesourcery.com> 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-09/txt/msg00300.txt.bz2 Thanks, this is okay. On Friday 16 September 2011 13:28:59, Tristan Gingold wrote: > + /* If we get here, it's an error. */ > if (shell) > { > - execlp (shell_file, shell_file, "-c", shell_command, (char *) 0); > - > - /* If we get here, it's an error. */ > fprintf_unfiltered (gdb_stderr, "Cannot exec %s: %s.\n", shell_file, > safe_strerror (errno)); I wouldn't mind merging the "Cannot exec" bits of both branches as well, always printing the whole argv. > - gdb_flush (gdb_stderr); > - _exit (0177); > } > else > { > - /* Otherwise, we directly exec the target program with > - execvp. */ > int i; > > - execvp (exec_file, argv); > - > - /* If we get here, it's an error. */ > safe_strerror (errno); This obviously isn't doing what was intended though... > fprintf_unfiltered (gdb_stderr, "Cannot exec %s ", exec_file); -- Pedro Alves