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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to