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: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org
- Date: Thu, 29 Aug 2013 12:27:41 -0600
- 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> <521F3B71 dot 1010007 at redhat dot com> <20130829130359 dot GA31063 at host2 dot jankratochvil dot net> <521F5804 dot 1080604 at redhat dot com> <87a9k0sgpf dot fsf at fleche dot redhat dot com> <521F5FD1 dot 8020107 at redhat dot com> <871u5csfrv dot fsf at fleche dot redhat dot com> <87li3kqunt dot fsf at fleche dot redhat dot com> <521F8912 dot 2020102 at redhat dot com>
Tom> second, the in process agent can't use gdb_socket_cloexec
Pedro> But, why ?
filestuff.o isn't available there. I guess it could be?
I will give it a whirl.
>> - open ("/dev/null", O_RDONLY);
>> + gdb_open_cloexec ("/dev/null", O_RDONLY, 0);
Pedro> This is the child opening its stdin. Doesn't look
Pedro> correct to close it on the subsequent exec.
Hahaha, barf.
Tom