Page MenuHomeFreeBSD

D55167.id171593.diff
No OneTemporary

D55167.id171593.diff

diff --git a/bin/cp/utils.c b/bin/cp/utils.c
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -216,7 +216,10 @@
if (!use_copy_file_range) {
wcount = copy_fallback(from_fd, to_fd);
}
- wtotal += wcount;
+ if (wcount >= 0)
+ wtotal += wcount;
+ else if (errno != EINTR)
+ break;
if (info) {
info = 0;
(void)fprintf(stderr,
@@ -224,7 +227,7 @@
entp->fts_path, to.base, to.path,
cp_pct(wtotal, fs->st_size));
}
- } while (wcount > 0);
+ } while (wcount != 0);
if (wcount < 0) {
warn("%s", entp->fts_path);
rval = 1;

File Metadata

Mime Type
text/plain
Expires
Sun, Jun 14, 12:04 AM (2 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33936737
Default Alt Text
D55167.id171593.diff (564 B)

Event Timeline