> well, pread/pwrite obviously are always enough, as you can simply use your
> own position indicator, and getting the current file position is hardly a
> blocking operation.
>
> any evidence (example of usefulness) to the contrary?

No

> (in fact, I was very reluctant to event implment the offs < 0 special case
> for read/write).

I like this feature. I'm using eio to output to stdout (in the case
that it is piped into an NFS file) and I'd rather not use pwrite() (or
seek!) on that fd.

Is there an 'o' missing in eio__pwrite ?

diff --git a/deps/libeio/eio.c b/deps/libeio/eio.c
index b26008b..9fcb42c 100644
--- a/deps/libeio/eio.c
+++ b/deps/libeio/eio.c
@@ -773,7 +773,7 @@ eio__pwrite (int fd, void *buf, size_t count, off_t offset)
ooffset = lseek (fd, 0, SEEK_CUR);
lseek (fd, offset, SEEK_SET);
res = write (fd, buf, count);
- lseek (fd, offset, SEEK_SET);
+ lseek (fd, ooffset, SEEK_SET);
X_UNLOCK (preadwritelock);

return res;

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to