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

Signed-off-by: Wei Xie <xiewei@linuxdeepin.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Wei Xie 2017-02-09 15:05:21 +08:00 committed by Alexandre Julliard
parent f9b4be5556
commit dfd22fb294
1 changed files with 1 additions and 1 deletions

View File

@ -799,7 +799,7 @@ Capture * qcap_driver_init( IPin *pOut, USHORT card )
sprintf(device, "/dev/video%i", card); sprintf(device, "/dev/video%i", card);
TRACE("opening %s\n", device); 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) if (capBox->fd == -1)
{ {
WARN("open failed (%d)\n", errno); WARN("open failed (%d)\n", errno);