More cases where libc should use O_CLOEXEC.

Change-Id: Idfa111aeebc5deca2399dae919e8b72eb54c23c0
This commit is contained in:
Elliott Hughes
2014-08-26 16:20:59 -07:00
parent 7b87d441b0
commit f73183f1a3
5 changed files with 6 additions and 23 deletions

View File

@@ -74,7 +74,7 @@ ScopedTrace::ScopedTrace(const char* message) {
}
if (g_trace_marker_fd == -1) {
g_trace_marker_fd = open("/sys/kernel/debug/tracing/trace_marker", O_WRONLY | O_CLOEXEC);
g_trace_marker_fd = open("/sys/kernel/debug/tracing/trace_marker", O_CLOEXEC | O_WRONLY);
if (g_trace_marker_fd == -1) {
__libc_fatal("Could not open kernel trace file: %s\n", strerror(errno));
}