From dfd22fb294c6ce9c3daba311f96ca3b4933d265c Mon Sep 17 00:00:00 2001 From: Wei Xie Date: Thu, 9 Feb 2017 15:05:21 +0800 Subject: [PATCH] qcap: Add O_CLOEXEC flag to prevent child process from inheriting handles. Signed-off-by: Wei Xie Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/qcap/v4l.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index bc760bdee40..d67df73b0cd 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -799,7 +799,7 @@ Capture * qcap_driver_init( IPin *pOut, USHORT card ) sprintf(device, "/dev/video%i", card); TRACE("opening %s\n", device); - capBox->fd = video_open(device, O_RDWR | O_NONBLOCK); + capBox->fd = video_open(device, O_RDWR | O_NONBLOCK | O_CLOEXEC); if (capBox->fd == -1) { WARN("open failed (%d)\n", errno);