Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159336228
D55167.id171593.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
564 B
Referenced Files
None
Subscribers
None
D55167.id171593.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D55167: cp: Expect EINTR while copying
Attached
Detach File
Event Timeline
Log In to Comment