From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B1DA01F5AE for ; Tue, 20 Jul 2021 20:49:28 +0000 (UTC) Received: by mail-qv1-xf33.google.com with SMTP id w2so10747380qvh.13 for ; Tue, 20 Jul 2021 13:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=llE2bPmI7S6u9qOa2vRqtXqVDR6dU4AkB598Q27lA9A=; b=KGV7lf4I4uh15tO4UEQv9k7WZwuSha0QA+f7xulVsWzL50CjQNauSaRLVHlNn6d6bX J3ULijrglTyHn2NFyaXw8whEQUre2LE3RLZy1NeNL+/e2b1Ub4l/XpE/ZK1IiDr8aGG2 F57uzf1Y0XzW+nIdklsPh8DrRCoJyN7vB5uA0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=llE2bPmI7S6u9qOa2vRqtXqVDR6dU4AkB598Q27lA9A=; b=O2Gn1HodEEhrRujSWzhvlsd53FNK9sBzszp+wC8xllViiWSiLKQMdLE1NC53LuGVit 7+Q03CRQIRXGzC2spszL15OcMKyn2u1p/XQ+9kEvxl1+P3yG3mNxzhAoM66FPqYoS7LY 8CY0rW6kX/5TvsT/dpMvPOD60OmltG7e6GVT31eg7uuuk5Ikti9oYCU/IUIvQp1CkG21 Uf5L6fnwFYm8PK3aKFi2l2jqr+MddkyxW4B/MwiRm07En6DIPHupsMpfGPcdMykvmxlw 4/D5dJOvzCxmcF/13gTUf542qk6HJjhSiEXPec9BLCiW/avNrnIbdxHU8VHFl32AFp4B oR1w== X-Gm-Message-State: AOAM531uOiBmkmgt7Vte07w1jA1QqGPdCIJeahisVeHNg9sA66aVYEPn UGJBr+a681VuHjE4/2BT+7WJpQ== X-Google-Smtp-Source: ABdhPJzKYVAw3Npxaq/MNYPzUZ2XVKg9U4lOd8Uf3ZUeksp9fdOyhJURkW+/hWxgNvNdHBrcIJCIxg== X-Received: by 2002:a0c:c401:: with SMTP id r1mr32042504qvi.47.1626814167546; Tue, 20 Jul 2021 13:49:27 -0700 (PDT) Received: from nitro.local ([89.36.78.230]) by smtp.gmail.com with ESMTPSA id y6sm10190199qke.1.2021.07.20.13.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 13:49:26 -0700 (PDT) Date: Tue, 20 Jul 2021 16:49:25 -0400 From: Konstantin Ryabitsev To: Eric Wong Cc: meta@public-inbox.org Subject: Re: Restarting daemons on config file change Message-ID: <20210720204925.7xkk6ktihohxnfo3@nitro.local> References: <20210719200318.wo4ydjonc3u3ibtu@nitro.local> <20210719204935.GA31835@dcvr> <20210720170019.p5d23tjb4v2mrekn@nitro.local> <20210720203433.GA28287@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210720203433.GA28287@dcvr> List-Id: On Tue, Jul 20, 2021 at 08:34:33PM +0000, Eric Wong wrote: > > Okay, let me see what I can come up with. Looks like the best course of action > > is to: > > > > 1. use a global blocking lock > > 2. copy the config file to a new location > > 3. make the necessary changes to the temporary config file > > 4. move the temp config file to overwrite the current config > > 5. release the lock > > public-inbox-init already does all of that. It doesn't set > all possible keys, yet (e.g. infourl, maybe some others). I figured as much, but we do want to set extra keys *and* write the config in a certain order (e.g. prioritizing some sources over others by listing them first). I currently do this via a list-id globbing match (e.g. --listid-priority=*.linux.dev,*.kernel.org,*). Apropos, question -- will public-inbox-init do anything to the config file if it finds that all the settings are already in place, or will it just accept them? -K