From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0PoUKog46GOb/wAAbAwnHQ (envelope-from ) for ; Sun, 12 Feb 2023 01:53:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YNtFKYg46GOLWwEAG6o9tA (envelope-from ) for ; Sun, 12 Feb 2023 01:53:28 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 756DF3A59D for ; Sun, 12 Feb 2023 01:53:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pR0c4-0008OB-94; Sat, 11 Feb 2023 19:53:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pR0c3-0008Ju-7t for bug-guix@gnu.org; Sat, 11 Feb 2023 19:53:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pR0c2-0007Xh-VQ for bug-guix@gnu.org; Sat, 11 Feb 2023 19:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pR0c2-0001Pu-RM for bug-guix@gnu.org; Sat, 11 Feb 2023 19:53:02 -0500 Subject: bug#57501: call-with-file-lock does not remove lock file Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Sun, 12 Feb 2023 00:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 57501 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ricardo Wurmus Cc: 57501-done@debbugs.gnu.org Mail-Followup-To: 57501@debbugs.gnu.org, ludo@gnu.org, rekado@elephly.net Received: via spool by 57501-done@debbugs.gnu.org id=D57501.16761631705418 (code D ref 57501); Sun, 12 Feb 2023 00:53:02 +0000 Received: (at 57501-done) by debbugs.gnu.org; 12 Feb 2023 00:52:50 +0000 Received: from localhost ([127.0.0.1]:43598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pR0bp-0001PK-UD for submit@debbugs.gnu.org; Sat, 11 Feb 2023 19:52:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pR0bm-0001Os-Om for 57501-done@debbugs.gnu.org; Sat, 11 Feb 2023 19:52:47 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pR0bh-0007WJ-5S; Sat, 11 Feb 2023 19:52:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=NKxb1RcDQrXm8+FzHN5oVL/hkiaQ2XZAe8kOUzINQdo=; b=mr9MGEM3UdN3PCKiNP2k eMv+i7tdBWy/YcHpawXC/859CFHSjaq9yHukGYXhXzQXiuGnwHNHNKnCaR4eDMauACR7LfQy/WVrJ WOHE0k/2tvJceWnlmH1dY1sEyQyglwArEKF3Mcacoaw1rz3XnYm9iIzcJ2VnZMahYZr1WvNKdEHUp j6beInH3dnBhObQwHc2ofeBQYH6BeD0towwVIl/Br1s1+y51F6VCQkEK+0uBC/FYNRx53i/wxLyn5 XcmXhcnuSRc85u7PTsiQH+sXIkVg1HB+ltEAxPSsam7aUv9Pqqho7W/mDZ/T/COprfbgflTMZFKsK +9kqgaSAUfZlYw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pR0bg-0002P0-HJ; Sat, 11 Feb 2023 19:52:40 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87v8q8razk.fsf@elephly.net> Date: Sun, 12 Feb 2023 01:52:36 +0100 In-Reply-To: <87v8q8razk.fsf@elephly.net> (Ricardo Wurmus's message of "Wed, 31 Aug 2022 11:50:38 +0200") Message-ID: <87y1p3ln6z.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676163208; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=NKxb1RcDQrXm8+FzHN5oVL/hkiaQ2XZAe8kOUzINQdo=; b=V4d2BM2j4m8hbhd7Nlr7fZpykM/MoTNZzNs8ffj8jYgmhCWk71qIFgIECHyE0xfgMTn3/h dOli65wIkSPDOrn5zh4KRN4HJV84uiHSqqgM8RzYGVGdd3a+PvLLcJ2IXEtcGehxC0fcL6 gUuk0DLmEpJwiSY/2jdEpieQWM9XBa+Q24jZ7BJ2igzwJKkz05ktxkQMHP7xjbyMXtTKni +B2KlnLG+IVimFLEo4ANZY3l1FvnQqDLki/3FEUjxdZVSC7NphMg6LJnMQk5bJFCaXQlVy XUkA3TL704CH7+OjyhQJgQW5woJ3In2CT1F71FSUIlsdEBMVmyvE61cf2KspGw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=mr9MGEM3; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676163208; a=rsa-sha256; cv=none; b=Rzp+q85+xFA+cW9JhezxiJDxjZDwK1tSZiW+cbqbGcpbbCxhHfJi9BkoVUc6TR1yUfsBnu 6PwMn95v+F/dj+/hfgCfn4YTbkD3NwRg2zNR4DzrijT4kzMv51OjU6xuiW6hzJnF2TTAwn OujHypoizLvbu1XPKP40B8kvtc+TqInYi6Ah5zQfHodNcHokCdD0rCM1AJKIVH45YOa45B t0OMG3NyPN/gWxksZivCfUk2PMe0Iuc4Klsr7jcP4G9kis4zMLkZK6xMo50LRcL2c95pO6 yTcifw+pGdnrH8B8m+QnznImJN0WO5At3wp79zULS7GzbRbjQtAWq6SrXYbQjw== X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -5.11 X-Spam-Score: -5.11 X-Migadu-Queue-Id: 756DF3A59D Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=mr9MGEM3; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-TUID: 6ywwyQt5lJI9 Ricardo Wurmus skribis: > =E2=80=9Ccall-with-file-lock=E2=80=9D and =E2=80=9Ccall-with-file-lock/no= -wait=E2=80=9D create a lock > file but don=E2=80=99t remove the lock file when they exit. > > (guix build syscalls) defines these procedures with =E2=80=9Cdynamic-wind= =E2=80=9D so > that the lock is always lifted with =E2=80=9Cunlock-file=E2=80=9D. While= =E2=80=9Cunlock-file=E2=80=9D > uses the fcntl syscall to remove the lock on the file, the lock file > itself is not deleted. > > I think it should be deleted. When the lock file sticks around we may > run into problems due to lock file ownership. For example, imagine a > cron job running as a different user that upgrades the contents of a > user profile. That cron job would leave behind an unlocked lock file > owned by that user, preventing the owner of the profile from operating > on the profile even though the lock has already been lifted with > =E2=80=9Cunlock-file=E2=80=9D. > > I propose letting either unlock-file or with-profile-lock delete the > lock file. Agreed. Done in a68229b9a0f450db622511adfe00ff7307d745d3, thanks! Ludo=E2=80=99.