This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch gdbserver 7.6.1 only] Fix fd leak regression
- From: Pedro Alves <palves at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 29 Aug 2013 13:15:45 +0100
- Subject: Re: [patch gdbserver 7.6.1 only] Fix fd leak regression
- Authentication-results: sourceware.org; auth=none
- References: <20130829111053 dot GA25662 at host2 dot jankratochvil dot net>
On 08/29/2013 12:10 PM, Jan Kratochvil wrote:
> Hi,
>
> in
> [commit without 7.6.1] [gdbserver patch] [7.6.1] Fix fd leak regression
> https://sourceware.org/ml/gdb-patches/2013-08/msg00845.html
> I wrote:
> # Although without 7.6.1 - 7.6 does not yet have gdb/common/filestuff.[ch] and
> # from various available solutions I think it is just OK to wait for 7.7.
>
> As I found I would like even 7.6.x fixed I wrote this alternative patch.
>
(We could also just mark the sockets as SOCK_CLOEXEC, I think?
Though that's "only" since Linux 2.6.27, so I've no objection with
going this route.)
I think we need to close remote_desc too. With plain "target remote",
the inferior is spawned before gdb connects, but with extended-remote+"run",
that's not the case.
--
Pedro Alves