This is a merged patch to plug many potential file descriptor leaks from parent to child processes when one thread calls a function which opens a file and another thread executes a child process before the thread with the new file descriptor gets time to set FD_CLOEXEC. All of the changes included simply add O_CLOEXEC to the options to open(). Some of the changes included in this merged patch rely on another patch which extends fopen() to set O_CLOEXEC when necessary http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/169320 Do not try this one without applying the dependency as well. Fix: See full description above. Patch attached with submission follows: How-To-Repeat: See full description above.
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped