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:
parent
f9b4be5556
commit
dfd22fb294
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue