commit | c10f60a4871d7e5cfe6b6a33b58c9c3dfd237bf5 | [log] [tgz] |
---|---|---|
author | Nick Kralevich <nnk@google.com> | Mon Jan 14 10:37:01 2019 -0800 |
committer | Nick Kralevich <nnk@google.com> | Mon Jan 14 10:37:01 2019 -0800 |
tree | 6ed578cca56496b9d9dbe4f67be25835cf8014ec | |
parent | b6d32aa5e84748d9b9f51fb11d6efaf4d1e97e66 [diff] |
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