[PATCH] Mark more file descriptors close-on-exec

Tom Tromey tom@tromey.com
Wed Sep 19 18:44:00 GMT 2018


>>>>> "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



More information about the Gdb-patches mailing list