From nobody Sun Feb 15 08:58:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fDKYn5GQBz6SGh1 for ; Sun, 15 Feb 2026 08:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fDKYn2WB3z46BX for ; Sun, 15 Feb 2026 08:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771145885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y1Mj553U3JvEEpTa5LBgmusE9SUCO/UvLyny6+gQE/Y=; b=iIIPbXGXB1wyb4KebjoixdLLJfjLqYBmrNZrxLCZozEeI+hSpT3d/HHp2WcsxH3O/FzvgJ 0y/JRSMkF7R0XPtWGgIlL7Xluk3KdEOHjoFjDFA1yuanNP3zWxjGXRgp+h4Lbj4RMZrYih RX8HJY/lUOjMYcxwDhYjB788N7fOh4yiMsWbe/s3oeqcnyy7qq+yCIKTcTbwch0lCuMby5 USltrOCc46h9kanQzAjqPhxigdd2wzqUiJ660z/rBymfXTI1b644n8mtMDmH0+SLxizIxW 7Sh92F5yPhC234O/SHJSbYJmvw3oO2yxG8Kf1FY/5WKz/AOq8Jw2c3ja8eEtrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771145885; a=rsa-sha256; cv=none; b=IAzVF7JIYhg7eKkRo5Kdtnc0K/orr6w26mMCeawBJhiY2ynbAW1xoDksNqciJGZxgJnCOz ZlJB/BmKEXb9dEHurdpLSbCnC9g07DsXjikytpa/mDM1zh8/3shSrBzBMxKCDibCjPdYni FVl2vQDL+ufcr7U6KV6Hfl28DhqCMPrjyTMov6mL1T4hB6lGPs+Am5B6fMenGZo9kEO/6Y jV6ylG5YMuPrrjZvQYl2YSohLZMWuDkVut7kQQTs/1QIPcbZZIMXEqRTdULhxhQXWrU81B NOIaec30/EgodpYoCoZ+pelUqSIpVA6trJxQUG5XbXcee/qy/ZGqeHc+cJvsKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771145885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y1Mj553U3JvEEpTa5LBgmusE9SUCO/UvLyny6+gQE/Y=; b=qXOP4aiq7GIMIqHDgs38kPY6lyqaIbZrN+2DC5TfKRKydLOZyYtWAHI6Q3H4LQrhjum6AV 3bdmkAlKHHqBN4Y67VLkn4Hq8pnkfmVAnT44RiuBhRfUQSAd+N9FcytRiBSXjGkWikQkXX 0SkNt9mhcLDcp709xSSOjU8IjWksRZF5fe+sIq69FV6UEI2l8HOmi2Z2M29TkbPe8LQveP A+eV67IGc6ls0Ke0/hXX9WfqWeEZ51+J+bFCQz/oq89uG+q+gU5t0IE1bpU3Mf09iTHxjy N07kok9d4jvFdJvXjvWDE8Qv0gXh/oNcmT5b3XhBRZxqZC5+WeROnDJUJvPzyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fDKYn0fSFzmq0 for ; Sun, 15 Feb 2026 08:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c15b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 15 Feb 2026 08:58:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 77385e9fac1c - stable/15 - cp: Expect EINTR while copying List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 77385e9fac1c34d7d3c1a778546ceb46c1b45796 Auto-Submitted: auto-generated Date: Sun, 15 Feb 2026 08:58:05 +0000 Message-Id: <69918a9d.1c15b.1b50ef97@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=77385e9fac1c34d7d3c1a778546ceb46c1b45796 commit 77385e9fac1c34d7d3c1a778546ceb46c1b45796 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-11 16:24:46 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-15 08:57:46 +0000 cp: Expect EINTR while copying Both copy_file_range() and copy_fallback() can be interrupted before they have read anything at all, in which case they return -1 and set errno to EINTR. If that happens, we should retry, not fail. PR: 293028 MFC after: 1 week Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D55167 (cherry picked from commit 7aa30669d6e04444b8ad1e4863a6e674fcac4afc) --- bin/cp/utils.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 2036056ada68..2579ea0a9603 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -216,7 +216,10 @@ copy_file(const FTSENT *entp, bool dne, bool beneath) 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 @@ copy_file(const FTSENT *entp, bool dne, bool beneath) 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;