summaryrefslogtreecommitdiffstats
path: root/libcutils/sched_policy.c
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-05-08 15:07:58 -0700
committerJeff Brown <jeffbrown@google.com>2012-05-08 15:07:58 -0700
commit5b878d24c1f01a5f131d470280b51bcfb5638600 (patch)
treeba1061befa7d9ec91c769c2dfcd452db63a9509d /libcutils/sched_policy.c
parentbff8f3fa9848e52e3f3fe773796a03a80133992a (diff)
downloadcore-5b878d24c1f01a5f131d470280b51bcfb5638600.tar.gz
core-5b878d24c1f01a5f131d470280b51bcfb5638600.tar.bz2
core-5b878d24c1f01a5f131d470280b51bcfb5638600.zip
Revert "Revert "Use O_CLOEXEC when opening cgroup fds.""
This reverts commit 4df54bc4a85eacfff9c81dc0a7ebf3fd88a99982.
Diffstat (limited to 'libcutils/sched_policy.c')
-rw-r--r--libcutils/sched_policy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c
index 79c6994d9..e03ce009a 100644
--- a/libcutils/sched_policy.c
+++ b/libcutils/sched_policy.c
@@ -131,32 +131,32 @@ static void __initialize(void) {
#if CAN_SET_SP_SYSTEM
filename = "/dev/cpuctl/tasks";
- system_cgroup_fd = open(filename, O_WRONLY);
+ system_cgroup_fd = open(filename, O_WRONLY | O_CLOEXEC);
if (system_cgroup_fd < 0) {
SLOGV("open of %s failed: %s\n", filename, strerror(errno));
}
#endif
filename = "/dev/cpuctl/foreground/tasks";
- fg_cgroup_fd = open(filename, O_WRONLY);
+ fg_cgroup_fd = open(filename, O_WRONLY | O_CLOEXEC);
if (fg_cgroup_fd < 0) {
SLOGE("open of %s failed: %s\n", filename, strerror(errno));
}
filename = "/dev/cpuctl/bg_non_interactive/tasks";
- bg_cgroup_fd = open(filename, O_WRONLY);
+ bg_cgroup_fd = open(filename, O_WRONLY | O_CLOEXEC);
if (bg_cgroup_fd < 0) {
SLOGE("open of %s failed: %s\n", filename, strerror(errno));
}
filename = "/dev/cpuctl/audio_app/tasks";
- audio_app_cgroup_fd = open(filename, O_WRONLY);
+ audio_app_cgroup_fd = open(filename, O_WRONLY | O_CLOEXEC);
if (audio_app_cgroup_fd < 0) {
SLOGV("open of %s failed: %s\n", filename, strerror(errno));
}
filename = "/dev/cpuctl/audio_sys/tasks";
- audio_sys_cgroup_fd = open(filename, O_WRONLY);
+ audio_sys_cgroup_fd = open(filename, O_WRONLY | O_CLOEXEC);
if (audio_sys_cgroup_fd < 0) {
SLOGV("open of %s failed: %s\n", filename, strerror(errno));
}