diff options
author | Russell King <rmk@arm.linux.org.uk> | 2013-06-20 13:31:26 +0100 |
---|---|---|
committer | Russell King <rmk@arm.linux.org.uk> | 2013-06-20 13:31:26 +0100 |
commit | dde5602fbe9619ad1caafbfdaad47b9605da1ffa (patch) | |
tree | 2639b18d68c02163adc374d200f9d1df5f7ab893 /bmm_lib.c | |
parent | d752ee23c4f0db5edd5c1ac686c8871174ff8ffc (diff) |
Open the bmm device with O_CLOEXEC
We don't want to pass the BMM file descriptor to child programs, so
ensure that it is opened using the O_CLOEXEC flag to prevent that
happening.
Diffstat (limited to 'bmm_lib.c')
-rw-r--r-- | bmm_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -36,7 +36,7 @@ int bmm_init() { /* attempt to open the BMM driver */ if(bmm_fd < 0) { - bmm_fd = open(BMM_DEVICE_FILE, O_RDWR); + bmm_fd = open(BMM_DEVICE_FILE, O_RDWR | O_CLOEXEC); pr_debug("BMM device fd: %d\n", bmm_fd); } |