[PATCH] procd: add procd_unlock wrapper

Florian Eckert fe at dev.tdt.de
Tue Dec 20 01:28:58 PST 2022


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 <fe at dev.tdt.de>
---
 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
 
-- 
2.30.2




More information about the openwrt-devel mailing list