This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 4/6] Use mkostemp, not mkstemp
On 2018-09-26 7:11 a.m., Tom Tromey wrote:
> I noticed that gdb could leak file descriptors coming from mkstemp.
> This patch fixes the problem by importing the gnulib mkostemp instead,
> and then changing gdb to pass O_CLOEXEC.
While this looks like the correct thing to do, I am curious to know if
you encountered an actual issue or this is theoretical. I don't see
how a fork/exec could happen while one of these temp files are open.
Simon