HomeFreeBSD

install: Expect EINTR while copying

Description

install: Expect EINTR while copying

Both copy_file_range() and read() / write() in our fallback loop can be
interrupted before copying anything at all, in which case it returns -1
and sets errno to EINTR. If that happens, we should retry, not fail.

While here, drop the size argument from copy() (we always want to copy
the entire file anyway) and add test cases which exercise the metalog
and digest functionality.

PR: 293028
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55168

(cherry picked from commit 0fb940fd63dd9b6d6b848421c53b1e9ac8387265)

Details

Provenance
desAuthored on Feb 11 2026, 4:24 PM
Reviewer
kevans
Differential Revision
D55168: install: Expect EINTR while copying
Parents
rG77385e9fac1c: cp: Expect EINTR while copying
Branches
Unknown
Tags
Unknown