RFR: JDK-8301621: libzip should use pread instead of lseek+read
Justin King
jcking at openjdk.org
Fri Feb 3 19:56:46 UTC 2023
Avoid using `lseek` + `read` in favor of `pread`. For Windows, we can do the same thing by using `OVERLAPPED`, as we are in synchronous mode we can use `Offset` and `OffsetHigh` to achieve the same thing.
Additionally I updated open to use `O_CLOEXEC` when available, as that really should be used.
-------------
Commit messages:
- Avoid extra seek syscall in libzip while reading
Changes: https://git.openjdk.org/jdk/pull/12417/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12417&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8301621
Stats: 67 lines in 1 file changed: 17 ins; 9 del; 41 mod
Patch: https://git.openjdk.org/jdk/pull/12417.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12417/head:pull/12417
PR: https://git.openjdk.org/jdk/pull/12417
More information about the core-libs-dev
mailing list