This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Mark more file descriptors close-on-exec
- From: Tom Tromey <tom at tromey dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 19 Sep 2018 12:44:18 -0600
- Subject: Re: [PATCH] Mark more file descriptors close-on-exec
- References: <20180918224747.6396-1-tom@tromey.com> <20180919153009.GQ19172@adacore.com>
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> Which other locations did you notice that you couldn't compile?
I grep for '[^ \t]f*open ('. Some of the hits should not be cloexec --
like the tty stuff. But nto-procfs.c, proc-api.c, procfs.c,
spu-linux-nat.c, and windows-nat.c should probably all use it.
It's relatively unimportant because it is hard to see any bad behavior,
at least for some uses of open. You have to have a python or guile
thread running that does an exec at the exact wrong instant.
Nevertheless it's good for gdb to remain clean this way.
Tom