diff options
| author | 2012-01-19 14:32:47 -0800 | |
|---|---|---|
| committer | 2012-01-19 14:32:47 -0800 | |
| commit | 874c1e9aa598b45e7114a69ecb4194c167a8b39d (patch) | |
| tree | 178ddf46df9306a8eccfd7c6ba66d278e460af81 /services/input/EventHub.cpp | |
| parent | e22afbedc1a71905d112d8cf78ca8c2a27e371fe (diff) | |
Use O_CLOEXEC when opening input device.
Change-Id: I931614ef4fe2143c9e124c3239d74a4a2ce3816c
Diffstat (limited to 'services/input/EventHub.cpp')
| -rw-r--r-- | services/input/EventHub.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp index ee9824ef1bbc..296c95ec937e 100644 --- a/services/input/EventHub.cpp +++ b/services/input/EventHub.cpp @@ -831,7 +831,7 @@ status_t EventHub::openDeviceLocked(const char *devicePath) { ALOGV("Opening device: %s", devicePath); - int fd = open(devicePath, O_RDWR); + int fd = open(devicePath, O_RDWR | O_CLOEXEC); if(fd < 0) { ALOGE("could not open %s, %s\n", devicePath, strerror(errno)); return -1; |