From nobody Sun Feb 15 08:58:54 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 4fDKZk6q3Kz6SGwp for ; Sun, 15 Feb 2026 08:58:54 +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 4fDKZk5Czwz47G6 for ; Sun, 15 Feb 2026 08:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771145934; 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=sV7ZH5YdG57/wNc+2yvxvxXZC0Rama7SJLRN+5TPKL0=; b=tQdNGVUMzLNs7Q006zw84t+03PcyPaZY2Gb/P77zHoEp+NcwHzz58xpEILJyCukcZzYClZ wv3oheVNc6UuZe9YuS+09Vbk2WtHmfR77e9Yjig3icA3UR6z+FQUUCJAUT9pA89egQ3l/2 dCb2kzc9uQC3jSCFznfNvE1f0afNclYs6M6aTnqCS6D8ksfYetghPjlp9PRkaMsqPombpA dc1kyhD/HhzCxFSdby/SJT/Lfkl5OAhx55SifOd0uVEQavD2fbFrqqsOCcVjv3Cfjo/WrN 0jaVILKSxft0AmJ2xRqEHOWbt5ad/SOJgQLShCa/+qSBFJE9BqOgHjUrqAHEHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771145934; a=rsa-sha256; cv=none; b=h5U1U8tr/AHssVO7BxurCNDim7Ctkn8kbBpYP1KgkDv3GM6nIirAae6eO+CSlluFHKxNkJ hAvbDeTOkw8QC4oxZ/KlyjUWHhiW4Xqe1CG+WBdQP/L30yOybOzadw7rTZWbhybYaRK4q1 OGaELyYR5SEmBS5OfdTHpUhrEzZpUJaX8LCYU5cipmWEGZrFMVA1QAtSgvd7WiSo5kJOoe kUjzTqdw9EfXWVEECLgXatsWj9vmLwmpbcflxj6eQJjh234ewTHjAbfgs8b40j+wHHLHZS UBeyjbJi0tfh+kvezRtRgglsNcdSQpzk/RVHQZLHYDuJUYghVY/m6iioFZRxlA== 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=1771145934; 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=sV7ZH5YdG57/wNc+2yvxvxXZC0Rama7SJLRN+5TPKL0=; b=PJY3KbnKw2IE73eEyT5lnPRhiUiD5qlND7o+4o4PbHhNP7etKsyhnXmEMl0f5zOhAxD3g5 TqQgSTEh2BDrBOX/2R5mNePB9PF9aetmkoiYQmouL53cwJNbBjzFVI8zTc/B3mqXy91CF2 zjW2mySIUSoURMAjyypvyWZGDZdvcNQarxxRGb5nEctIn5wWPjOKe5/bdyVx7Eodce4sya fC51U9BO6+fWk3rpNDrSh8N7dZQJ75flXcs0gDmjwwcgKQcgecm8u58L5Z+hhZf2guJ7bg Wg7JB2WuTgDyVqPH23tEU/SAKV2cAsmYx5AmZccVOogGeyanMcjP3K8o2UFtXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fDKZk4YykzmMn for ; Sun, 15 Feb 2026 08:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d7f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 15 Feb 2026 08:58:54 +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: f1a86b35dedb - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: f1a86b35dedba1b7dfa0ec8dae63b08a76cd395a Auto-Submitted: auto-generated Date: Sun, 15 Feb 2026 08:58:54 +0000 Message-Id: <69918ace.1d7f3.5c619b9b@gitrepo.freebsd.org> The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f1a86b35dedba1b7dfa0ec8dae63b08a76cd395a commit f1a86b35dedba1b7dfa0ec8dae63b08a76cd395a Author: Dag-Erling Smørgrav AuthorDate: 2026-02-11 16:24:46 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-15 08:58:45 +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 9f6ef888c7ea..7590d7d3ee1d 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -213,7 +213,10 @@ copy_file(const FTSENT *entp, int dne) 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, @@ -221,7 +224,7 @@ copy_file(const FTSENT *entp, int dne) entp->fts_path, to.p_path, cp_pct(wtotal, fs->st_size)); } - } while (wcount > 0); + } while (wcount != 0); if (wcount < 0) { warn("%s", entp->fts_path); rval = 1;