mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-07 12:06:32 -04:00
filter-graph: handle fcntl errors better
Don't set invalid flags when the F_GETFL failed.
This commit is contained in:
parent
fed4d14ab7
commit
8276d615ba
1 changed files with 5 additions and 2 deletions
|
|
@ -3114,8 +3114,11 @@ static void *pipe_instantiate(const struct spa_fga_plugin *plugin, const struct
|
|||
|
||||
do_exec(impl, command);
|
||||
|
||||
fcntl(impl->write_fd, F_SETFL, fcntl(impl->write_fd, F_GETFL) | O_NONBLOCK);
|
||||
fcntl(impl->read_fd, F_SETFL, fcntl(impl->read_fd, F_GETFL) | O_NONBLOCK);
|
||||
int flags;
|
||||
if ((flags = fcntl(impl->write_fd, F_GETFL)) >= 0)
|
||||
fcntl(impl->write_fd, F_SETFL, flags | O_NONBLOCK);
|
||||
if ((flags = fcntl(impl->read_fd, F_GETFL)) >= 0)
|
||||
fcntl(impl->read_fd, F_SETFL, flags | O_NONBLOCK);
|
||||
|
||||
return impl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue