[PATCH] ltq-dsl-base: only lock the dsl pipe once for all stats

Florian Eckert fe at dev.tdt.de
Fri Dec 4 07:18:14 EST 2020


Hi

> is there any reason not to use the flock style below? It should be more
> reliable wrt. unlocking if the script is prematurely terminated.
> 
> -- 8< --
>   {
>       flock -x 1000
> 
>       command
>       command
>       command
>       ...
>   } 1000>/var/lock/dsl_pipe
> -- >8 --

We could also use the procd_lock function [1].
As I already use in mwan3 [2].

Florian

[1] https://github.com/openwrt/openwrt/search?q=procd_lock
[2] https://github.com/openwrt/packages/search?q=procd_lock



More information about the openwrt-devel mailing list