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

Jo-Philipp Wich jo at mein.io
Fri Dec 4 07:03:21 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 --


See also the fourth example at
https://man7.org/linux/man-pages/man1/flock.1.html#EXAMPLES

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20201204/bbc45b25/attachment.sig>


More information about the openwrt-devel mailing list