On 04/12/2020 13:25, Andre Heider wrote:
Hi,
On 04/12/2020 13:03, Jo-Philipp Wich wrote:
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.
I guess because it gets more difficult to fish out the answer
On 04/12/2020 13:25, Andre Heider wrote:
Hi,
On 04/12/2020 13:03, Jo-Philipp Wich wrote:
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.
I guess because it gets more difficult to fish out the answer
Hi,
On 04/12/2020 13:03, Jo-Philipp Wich wrote:
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.
I guess because it gets more difficult to fish out the answer for each
command then (I didn't check if
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
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
Hi,
> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Andre Heider
> Sent: Freitag, 4. Dezember 2020 08:44
> To: openwrt-devel@lists.openwrt.org
> Subject: [PATCH] ltq-dsl-base: only lock the dsl pipe once for all
Instead of locking/unlocking it for every command.
Reduces the runtime for the dslstat/lucistat commands to ~66%.
Before:
real0m 2.66s
user0m 0.90s
sys 0m 1.76s
After:
real0m 1.76s
user0m 0.63s
sys 0m 1.13s
Signed-off-by: Andre Heider
---