From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [patch gdbserver 7.6.1 only] Fix fd leak regression
Date: Thu, 29 Aug 2013 17:47:00 -0000 [thread overview]
Message-ID: <521F8912.2020102@redhat.com> (raw)
In-Reply-To: <87li3kqunt.fsf@fleche.redhat.com>
On 08/29/2013 06:22 PM, Tom Tromey wrote:
> Tom> Yeah, I meant the other filestuff.h code, like gdb_socket_cloexec and
> Tom> gdb_pipe_cloexec.
>
> second, the in process agent can't use gdb_socket_cloexec
But, why ?
> @@ -596,7 +596,7 @@ linux_create_inferior (char *program, char **allargs)
> if (remote_connection_is_stdio ())
> {
> close (0);
> - open ("/dev/null", O_RDONLY);
> + gdb_open_cloexec ("/dev/null", O_RDONLY, 0);
This is the child opening its stdin. Doesn't look
correct to close it on the subsequent exec.
>
> #include <ctype.h>
> #include <fcntl.h>
> @@ -147,6 +148,9 @@ trace_vdebug (const char *fmt, ...)
> # define ust_loaded gdb_agent_ust_loaded
> # define helper_thread_id gdb_agent_helper_thread_id
> # define cmd_buf gdb_agent_cmd_buf
> +
> +/* We don't want to use this one in IPA. */
"because ..." ?
> +# define gdb_socket_cloexec socket
> #endif
--
Pedro Alves
next prev parent reply other threads:[~2013-08-29 17:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 11:11 Jan Kratochvil
2013-08-29 12:15 ` Pedro Alves
2013-08-29 13:04 ` Jan Kratochvil
2013-08-29 14:17 ` Pedro Alves
2013-08-29 14:27 ` [commit 7.6.1 only] " Jan Kratochvil
2013-08-29 14:39 ` Pedro Alves
2013-08-29 14:40 ` Tom Tromey
2013-08-29 14:51 ` Pedro Alves
2013-08-29 15:00 ` Tom Tromey
2013-08-29 17:22 ` Tom Tromey
2013-08-29 17:47 ` Pedro Alves [this message]
2013-08-29 18:27 ` Tom Tromey
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=521F8912.2020102@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=tromey@redhat.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