diff options
author | 2018-10-16 20:22:37 -0700 | |
---|---|---|
committer | 2018-10-19 13:06:33 -0700 | |
commit | dfcd82c09e8ce4562ed39e006d4b1c8163b4e25e (patch) | |
tree | d9bfd3e043a95b3c8e302769cef23c13a89df3c5 /runtime/monitor_android.cc | |
parent | 4f570a43146c1456071f2ffe6590ab96e723051a (diff) |
ART: Fix android-cloexec warnings
Use the DupCloexec helper wherever possible. Add O_CLOEXEC to open
and fopen calls.
Bug: 32619234
Test: WITH_TIDY=1 mmma art
Change-Id: I0afb1beea53ab8f68ab85d1762aff999903060fe
Diffstat (limited to 'runtime/monitor_android.cc')
-rw-r--r-- | runtime/monitor_android.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/monitor_android.cc b/runtime/monitor_android.cc index 74623dab31..19e1f3d2c4 100644 --- a/runtime/monitor_android.cc +++ b/runtime/monitor_android.cc @@ -43,7 +43,7 @@ void Monitor::LogContentionEvent(Thread* self, // Emit the process name, <= 37 bytes. { - int fd = open("/proc/self/cmdline", O_RDONLY); + int fd = open("/proc/self/cmdline", O_RDONLY | O_CLOEXEC); char procName[33]; memset(procName, 0, sizeof(procName)); read(fd, procName, sizeof(procName) - 1); |