]> git.sesse.net Git - plocate/blobdiff - complete_pread.h
Release plocate 1.1.7.
[plocate] / complete_pread.h
index fec57870c1c45d1a031118eee424c19a6f956ba1..b0f2bd7bc3e33adf9c8346b32b90c1a38e81c369 100644 (file)
@@ -3,8 +3,11 @@
 
 #include <unistd.h>
 
-// A wrapper around pread() that returns an incomplete read.
-// Always synchronous (no io_uring).
+// A wrapper around pread() that retries on short reads and EINTR,
+// so you never need to call it twice. Always synchronous (no io_uring).
+bool try_complete_pread(int fd, void *ptr, size_t len, off_t offset);
+
+// Same, but exit on failure, so never returns a short read.
 void complete_pread(int fd, void *ptr, size_t len, off_t offset);
 
 #endif  // !defined(COMPLETE_PREAD_H)