Commit da801d18 authored by Kevin Wolf's avatar Kevin Wolf

libc: Blockierendes read() mit LIOv1

! libc: read() darf nicht -EAGAIN zurückgeben, wenn es eigentlich
  blockierend sein sollte. Weil LIOv1 nicht wirklich blockieren kann,
  muss read() selber eine entsprechende Schleife haben.
Signed-off-by: Kevin Wolf's avatarKevin Wolf <kevin@tyndur.org>
parent 34c9402e
......@@ -446,7 +446,13 @@ ssize_t read(int fd, void* buffer, size_t size)
return -1;
}
retry:
ret = lio_compat_read(buffer, 1, size, file);
if (ret == -EAGAIN) {
yield();
goto retry;
}
if (ret < 0) {
errno = -ret;
ret = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment