Skip to content

Commit ed73440

Browse files
Jeff BrownAndroid (Google) Code Review
authored andcommitted
Merge "Use O_CLOEXEC when opening input device."
2 parents dd3ba43 + 874c1e9 commit ed73440

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/input/EventHub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ status_t EventHub::openDeviceLocked(const char *devicePath) {
831831

832832
ALOGV("Opening device: %s", devicePath);
833833

834-
int fd = open(devicePath, O_RDWR);
834+
int fd = open(devicePath, O_RDWR | O_CLOEXEC);
835835
if(fd < 0) {
836836
ALOGE("could not open %s, %s\n", devicePath, strerror(errno));
837837
return -1;

0 commit comments

Comments
 (0)