This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Preliminary work in fork_inferior
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