mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
parent
f961c726de
commit
8a9bb9dabb
2 changed files with 3 additions and 2 deletions
|
|
@ -26,6 +26,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include <spa/utils/result.h>
|
#include <spa/utils/result.h>
|
||||||
|
|
||||||
|
|
@ -83,7 +84,7 @@ static GstPipeWireCore *make_core (int fd)
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
core->core = pw_context_connect (core->context, NULL, 0);
|
core->core = pw_context_connect (core->context, NULL, 0);
|
||||||
else
|
else
|
||||||
core->core = pw_context_connect_fd (core->context, dup(fd), NULL, 0);
|
core->core = pw_context_connect_fd (core->context, fcntl(fd, F_DUPFD_CLOEXEC, 3), NULL, 0);
|
||||||
|
|
||||||
if (core->core == NULL)
|
if (core->core == NULL)
|
||||||
goto connection_failed;
|
goto connection_failed;
|
||||||
|
|
|
||||||
|
|
@ -635,7 +635,7 @@ static int impl_steal_fd(struct pw_protocol_client *client)
|
||||||
if (impl->source == NULL)
|
if (impl->source == NULL)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
fd = dup(impl->source->fd);
|
fd = fcntl(impl->source->fd, F_DUPFD_CLOEXEC, 3);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue