Wei Xie : qcap: Add O_CLOEXEC flag to prevent child process from inheriting handles.

Alexandre Julliard julliard at winehq.org
Mon Feb 13 15:24:40 CST 2017


Module: wine
Branch: master
Commit: dfd22fb294c6ce9c3daba311f96ca3b4933d265c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=dfd22fb294c6ce9c3daba311f96ca3b4933d265c

Author: Wei Xie <xiewei at linuxdeepin.com>
Date:   Thu Feb  9 15:05:21 2017 +0800

qcap: Add O_CLOEXEC flag to prevent child process from inheriting handles.

Signed-off-by: Wei Xie <xiewei at linuxdeepin.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 bc760bd..d67df73 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);




More information about the wine-cvs mailing list