diff options
author | Russell King <rmk@arm.linux.org.uk> | 2013-06-23 12:23:13 +0100 |
---|---|---|
committer | Russell King <rmk@arm.linux.org.uk> | 2013-06-23 12:23:13 +0100 |
commit | d33ca77beb2abc7ef012570044c7a471a6544f3b (patch) | |
tree | 980843e68e46ae937fbda44eb2f30bea9831fc75 | |
parent | e39177a427a4f71ef5a3ff2aee426e395ee86b73 (diff) |
Open /dev/vmeta with O_CLOEXEC
Ensure that the vmeta file descriptor gets closed if the application
exec()'s another program.
-rw-r--r-- | vmeta_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vmeta_lib.c b/vmeta_lib.c index e657860..c483754 100644 --- a/vmeta_lib.c +++ b/vmeta_lib.c @@ -378,7 +378,7 @@ SIGN32 vdec_os_driver_init(void) vdec->refcount++; // Try to open the (new) vmeta device - vdec->fd = open("/dev/vmeta", O_RDWR); + vdec->fd = open("/dev/vmeta", O_RDWR | O_CLOEXEC); if (vdec->fd == -1) { ret = -VDEC_OS_DRIVER_OPEN_FAIL; goto err_open_fail; |