mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
don't handle EINTR and EAGAIN as the same
EAGAIN means a non-blocking operation would block and we should not try again right away but leave the loop and wait instead. See #358
This commit is contained in:
parent
e094640c7b
commit
c43026d93e
8 changed files with 10 additions and 10 deletions
|
|
@ -1080,9 +1080,9 @@ static inline uint32_t cycle_run(struct client *c)
|
|||
/* this is blocking if nothing ready */
|
||||
while (true) {
|
||||
if (SPA_UNLIKELY(read(fd, &cmd, sizeof(cmd)) != sizeof(cmd))) {
|
||||
if (errno == EAGAIN || errno == EINTR)
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
if (errno == EWOULDBLOCK)
|
||||
if (errno == EWOULDBLOCK || errno == EAGAIN)
|
||||
return 0;
|
||||
pw_log_warn(NAME" %p: read failed %m", c);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue