summaryrefslogtreecommitdiff
path: root/src/accelerometer/accelerometer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/accelerometer/accelerometer.c')
-rw-r--r--src/accelerometer/accelerometer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/accelerometer/accelerometer.c b/src/accelerometer/accelerometer.c
index babd66f6b5..925d38de1f 100644
--- a/src/accelerometer/accelerometer.c
+++ b/src/accelerometer/accelerometer.c
@@ -197,7 +197,7 @@ static void test_orientation(struct udev *udev,
old = get_prev_orientation(dev);
- fd = open(devpath, O_RDONLY);
+ fd = open(devpath, O_RDONLY|O_CLOEXEC);
if (fd < 0)
return;