Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Tristan Gingold <gingold@adacore.com>
Cc: "gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Preliminary work in fork_inferior
Date: Fri, 16 Sep 2011 14:38:00 -0000	[thread overview]
Message-ID: <201109161419.55173.pedro@codesourcery.com> (raw)
In-Reply-To: <8B49B563-BE0B-452C-8956-31E00A880D96@adacore.com>

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


  reply	other threads:[~2011-09-16 13:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07 13:09 [RFC] Support of Lion (darwin 11) Tristan Gingold
2011-09-07 13:14 ` Pedro Alves
2011-09-07 13:28   ` Pedro Alves
2011-09-07 13:47   ` Tristan Gingold
2011-09-16 13:20   ` [RFA] Preliminary work in fork_inferior Tristan Gingold
2011-09-16 14:38     ` Pedro Alves [this message]
2011-09-16 14:52       ` Tristan Gingold
2011-09-16 15:28         ` Pedro Alves
2011-09-16 18:25           ` Tristan Gingold
2011-09-16 14:47     ` Abhijit Halder
2011-09-16 14:55       ` Tristan Gingold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201109161419.55173.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gingold@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox