From d33ca77beb2abc7ef012570044c7a471a6544f3b Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 23 Jun 2013 12:23:13 +0100 Subject: Open /dev/vmeta with O_CLOEXEC Ensure that the vmeta file descriptor gets closed if the application exec()'s another program. --- vmeta_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit