From nobody Sun Feb 15 08:58:47 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 4fDKZc3gtNz6SGsm for ; Sun, 15 Feb 2026 08:58:48 +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 4fDKZc111Kz46xw for ; Sun, 15 Feb 2026 08:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771145928; 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=+BDygMtvv+zrmHEUBiOJ8hq47/oC/N7s0VY59ErWdf0=; b=p6mWuDcsGF/pUkkk+r6c/gg6qCgSOV3CgkNWSJxd1Ni0R+/kx9Nki0d85CRvnGBdzdr3Ac aWbbH19/Bm8nlT69CUdTJl4cZ+OFxWK9jLPwK2fQ2mbGG+F/D45M84Y/J7uMpZWXKMn4my 9b05tcc7W7RSEWggqp/Wa2PriCfnBC/ozVbgvoUd6kXOqdvZ1frjDhHnCMG9C/C2wA8XxB 5JO8Nj/SmnliZBZeQwcmmHhNWQanrn9E0tCZamzDDA2MUHCebLapLc2vs3l/rXgmxWXNiz kY9OuUvIh1nISk8YqrN3g92BsJR4TceDkz7ruxL73huJzJ8oRnnF2GvjR8Wuuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771145928; a=rsa-sha256; cv=none; b=ZXXcewBojAz+NJIYMQNUKjaPArIOazhtD/MgerKFcsjUgEKnkDZ6mDUmwnwfTURguo0GoY yT5O7/Wa5At1v5nDcZ2+BbaDdwbKgVU4iXSvHSQ7kSTVMIGSy6PR6wNgFpnaXW9fyuF/uk nyUiAFJUGJbGdgjWTTnvOjMkRoI7EaCFu4/Oh2OqxTrznVylBXwYd4pyHRt5JuO7POTasM pCSkvHLNqLiwpU684jiHEUIc/ij0Sq0Va00zPQD27UJgb43Nt9xM/r8RelVScDDg26Vn2e kaKcWL52jq8+GI9NcGMwOWMaFkW5McnFidMObFnOB5nBa1DUK9UqW9PzQBAwPw== 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=1771145928; 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=+BDygMtvv+zrmHEUBiOJ8hq47/oC/N7s0VY59ErWdf0=; b=KbxNeLFpM4nZF9ZiVy086CQQJy1CkcpNy7pfAp+LF+LAI5wWKsltrzV2d8D7xJO0clcMkJ J4UoMuBRUrGEvOUJjyuQxAUcx/6lYrPZlTNf4pBhzwtH6qqRIymKqVLroiLZq2TA+zeU5X 8wGEZiaB5Mx4dsjeJnj5YCaeeBcVDI5U1l6hAhiENXUZJjk8I6lFp6tuKtaPzB1YK7GZDu u8faLRHQJxrN6WUJ5DuKptnFHbDNJaESrcmYbMUTpKAu9RNp1lBL/HiZYDLWNPquYKybo+ EthokKc4nO89pUVA/9QsYdsDVjxzaBWvOp5sz1mMOm5j9KYWzf7nM3GoNoCxwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fDKZb6PjBzmrP for ; Sun, 15 Feb 2026 08:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ca4f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 15 Feb 2026 08:58:47 +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: a9ac7da4c0c3 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: a9ac7da4c0c3907e21a5634a2338878eb9b33453 Auto-Submitted: auto-generated Date: Sun, 15 Feb 2026 08:58:47 +0000 Message-Id: <69918ac7.1ca4f.1ac165d0@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a9ac7da4c0c3907e21a5634a2338878eb9b33453 commit a9ac7da4c0c3907e21a5634a2338878eb9b33453 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-11 16:24:46 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-15 08:58:34 +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 a2cb2f536843..a39c6ed0416b 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;