Skip to content
Commit c10f60a4 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

replace dup() with fcntl(F_DUPFD_CLOEXEC)

Replace calls to dup() with fcntl(F_DUPFD_CLOEXEC). The only difference
between the two is that O_CLOEXEC is set on the newly duped file
descriptor. This helps address file descriptor leaks crossing an exec()
boundary in multi-threaded processes

Test: compiles and boots
Change-Id: I6b82a7932593a5e39880fcf3ff6443dab6500094
parent b6d32aa5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment