This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch gdbserver 7.6.1 only] Fix fd leak regression


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]