libs: va: Add O_CLOEXEC flag at opening drm device.

So any other potential subprocess won't have access to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2386>
This commit is contained in:
Víctor Manuel Jáquez Leal 2022-05-06 17:53:51 +02:00 committed by GStreamer Marge Bot
parent 86105a4774
commit 13fbcde1e7

View file

@ -136,7 +136,7 @@ gst_va_display_drm_create_va_display (GstVaDisplay * display)
int fd, saved_errno = 0; int fd, saved_errno = 0;
GstVaDisplayDrm *self = GST_VA_DISPLAY_DRM (display); GstVaDisplayDrm *self = GST_VA_DISPLAY_DRM (display);
fd = open (self->path, O_RDWR); fd = open (self->path, O_CLOEXEC | O_RDWR);
saved_errno = errno; saved_errno = errno;
if (fd < 0) { if (fd < 0) {
GST_WARNING_OBJECT (self, "Failed to open %s: %s", self->path, GST_WARNING_OBJECT (self, "Failed to open %s: %s", self->path,