From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 06CF41FF2D3 for ; Fri, 12 Jul 2024 11:53:58 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0592CB4; Fri, 12 Jul 2024 11:54:23 +0200 (CEST) Message-ID: Date: Fri, 12 Jul 2024 11:54:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Maximiliano Sandoval , pmg-devel@lists.proxmox.com References: <20240710143540.434073-1-m.sandoval@proxmox.com> <20240710143540.434073-2-m.sandoval@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20240710143540.434073-2-m.sandoval@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.062 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [utils.pm] Subject: Re: [pmg-devel] [PATCH api v4 02/10] pmg-smtp-filter: move pid file into /run/pmg-smtp-filter X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pmg-devel-bounces@lists.proxmox.com Sender: "pmg-devel" Am 10.07.24 um 16:35 schrieb Maximiliano Sandoval: > diff --git a/src/PMG/Utils.pm b/src/PMG/Utils.pm > index 5d9ded4..09cb42d 100644 > --- a/src/PMG/Utils.pm > +++ b/src/PMG/Utils.pm > @@ -1462,7 +1462,7 @@ sub get_pg_server_version { > > sub reload_smtp_filter { > > - my $pid_file = '/run/pmg-smtp-filter.pid'; > + my $pid_file = '/run/pmg-smtp-filter/pmg-smtp-filter.pid'; > my $pid = PVE::Tools::file_read_firstline($pid_file); > > return 0 if !$pid; Can there be a race here during/after update? I.e. service still running with PID file in old path and reload_smtp_filter() is called only checking the new path. Does something ensure this can't happen? Otherwise, I suppose we'll need to check the old path too until the next major release. And what about the other way around, i.e. service already running with PID file in new path and old version of reload_smtp_filter() called still checking the old path? _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel