From nobody Wed Apr 10 17:33:30 2024 X-Original-To: bugs@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 4VF90W1hkCz5FlfJ for ; Wed, 10 Apr 2024 17:33:31 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VF90W0YKrz4FVd for ; Wed, 10 Apr 2024 17:33:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712770411; a=rsa-sha256; cv=none; b=Uug/7YvcOZj3VtsoJigRDP23N44kjX8QZfhhrLhkVNWzfd6Opb9i1wRTFcn23c+90/Cb3F wUy8MyDwPPLsJ/wlhF5Qnl2qesa/BzNJxIzv/yn/LlKH7NAFtYXgHLihZtD5dP5eV+32QD ztaDBRRgfji5BcDh71yB4uByGFyYzyLX+XAsAQiogwqiz2wMsLiEhqoRGMNy6FYmbJ4vs8 tG6upLsTBYErHr3MU1Mr7tFHZOJbRKdlMBcMBxBfDyPdZUnKAXxfuJVx4Lkg6zLuUUOfV5 DUOCwQ/MxyfEQ6sYsAYgCdPjc38o7HZd5eNDvrlbGDT5UFRFw1uH9btvl2l8PQ== 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=1712770411; 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: in-reply-to:in-reply-to:references:references; bh=B4RnWJX9i0vDU1ugg+6y3Y7Wx9BOHOzR/6XvNapXWEw=; b=JkZqq0/KuPGoszOvO2qPIbDbHo/Q43ajJXkbWSQIoaZQhoYtG3eh4wujwkOngPADjnWbkH QBTIPMw1vzspBtIuGdRdoF23dFPnPv1gdt/h4jdPZttWz/d4N6c8kVt97EGvWJwqreluJC rQ4bZT8c9qPY8SdMLgKRHoB7jFujrDFpmnskjh4sp5qIMeecJq9exoENNr+3v6YeIMp8dL wQBAICbW7wg1LWNMVeWY6hlDHYtcBUGGHAE2bxDIPjI1TgzMZGQI/oCahXRK2Y4+IN0oTV 2gZiq1VyH3clrkZyCXIut4GQY5R+39kI0ZoK2rFLKtHHRXmc9UOCVb7gFdTmDQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VF90W08mHznMQ for ; Wed, 10 Apr 2024 17:33:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 43AHXUjd095373 for ; Wed, 10 Apr 2024 17:33:30 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43AHXUkQ095372 for bugs@FreeBSD.org; Wed, 10 Apr 2024 17:33:30 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271675] cp: Interrupted system call Date: Wed, 10 Apr 2024 17:33:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.0-STABLE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rozhuk.im@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: freebsd-bugs+owner@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271675 --- Comment #9 from Ivan Rozhuk --- I suspect that more correct is ignore EINTR error limited times and only th= en fallback to generic copy. So IMHO usage pattern must be one of: size_t ntry; const size_t max_ntry =3D 5; for (ntry =3D 0; ntry < max_ntry;) { int ret =3D copy_file_range(...); if (0 < ret) { ntry =3D 0; continue; } if (0 =3D=3D ret) break; /* Err handle. */ if (EINTR !=3D errno) break; ntry ++; /* Probably nanosleep() here. */ } if (ntry =3D=3D max_ntry) { /* Fail, do fallback code. */ } Or int ret; for (;;) { ret =3D copy_file_range(...); if (0 =3D=3D ret || /* Ok, EOF. */ (0 > ret && EINTR !=3D errno)) /* Unhandled error. */ break; } if (0 !=3D ret) { /* Fail, do fallback code. */ } --=20 You are receiving this mail because: You are the assignee for the bug.=