From patchwork Tue Dec 20 09:28:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Eckert X-Patchwork-Id: 1717744 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=G0JCQOlh; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nbrxv2F4nz1ydZ for ; Tue, 20 Dec 2022 20:34:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=uBoSOV50jwnDiDJi6yPLXVGAgjp4hGLoIzxBV4G3OKg=; b=G0JCQOlhtnyLZj /GgC60tNVWx/cDQT9l6Pb/IcLD6t6+utaeJkQhQLjM2F2h4Um0F8i2lircpq8eN6EXvSWsW3lYOQ4 KJWB1IWM5p444iAN6S1vhlfA/fSi18LvkvNuCkL4rX7IJ5GNyU7YthMPF4prhx+uswEfruse8U3pM HSmt4aHX80R8sxFl3l6u5qWIys/y+3BS0PtDiwY3kDDFTP52argGCFF2SFb/cy5memnpb16oQf02x Ln7Ndh5nLtlm6rOWj0PAFfgUJP5pRUGL6mMWJ5yf2WwW8LYHwCXOznj5isR0AXe4apItHWio7rdY7 YnSpmNPV2aRAjHcmrOVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7YwF-00CsFB-EU; Tue, 20 Dec 2022 09:29:32 +0000 Received: from mxout70.expurgate.net ([194.37.255.70]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7Yvy-00Cs8Q-V9 for openwrt-devel@lists.openwrt.org; Tue, 20 Dec 2022 09:29:16 +0000 Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1p7Yvr-000AAQ-G9; Tue, 20 Dec 2022 10:29:07 +0100 Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p7Yvq-0004be-O3; Tue, 20 Dec 2022 10:29:06 +0100 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id 4C98224004B; Tue, 20 Dec 2022 10:29:06 +0100 (CET) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id F039E240049; Tue, 20 Dec 2022 10:29:05 +0100 (CET) Received: from localhost.localdomain (unknown [10.2.3.40]) by mail.dev.tdt.de (Postfix) with ESMTPSA id 67580297AD; Tue, 20 Dec 2022 10:29:05 +0100 (CET) From: Florian Eckert To: daniel@makrotopia.org Cc: Eckert.Florian@googlemail.com, openwrt-devel@lists.openwrt.org Subject: [PATCH] procd: add procd_unlock wrapper Date: Tue, 20 Dec 2022 10:28:58 +0100 Message-ID: <20221220092858.4456-1-fe@dev.tdt.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.dev.tdt.de X-purgate-ID: 151534::1671528547-30FFDDF6-E702A322/0/0 X-purgate-type: clean X-purgate: clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221220_012915_235166_D7E4BD7C X-CRM114-Status: UNSURE ( 7.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Extend the procd shell wrapper lib with the missing funktion procd_unlock. This could be used in scripts to unlock a previously locked section. Signed-off-by: Florian Eckert --- package/system/procd/files/procd.sh | 4 ++++ 1 file changed, 4 insertions(+) Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [194.37.255.70 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Extend the procd shell wrapper lib with the missing funktion procd_unlock. This could be used in scripts to unlock a previously locked section. Signed-off-by: Florian Eckert --- package/system/procd/files/procd.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index e41117fb2c..c8e5fd0325 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -59,6 +59,10 @@ procd_lock() { fi } +procd_unlock() { + flock -u 1000 +} + _procd_call() { local old_cb