Bug 170369

Summary: More O_CLOEXEC flags to plug files being leaked to child processes
Product: Base System Reporter: jau
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: 9.1-PRERELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description jau 2012-08-04 10:20:05 UTC
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.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:30 UTC
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