]> git.ipfire.org Git - ipfire-2.x.git/commit - src/pakfire/lib/functions.pl
pakfire: Prevent from get launched multiple times.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 24 May 2021 17:38:20 +0000 (19:38 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 May 2021 09:51:56 +0000 (09:51 +0000)
commitd6c2e6715575c4d531f1302ab6c7368329da8bd4
tree1d63aff1de9886ea614359413ddbd14ea65fbce5
parentf0996ee6432eb717d332501024ac2cca3f9852a4
pakfire: Prevent from get launched multiple times.

When pakfire gets launched a check if a so called lockfile exists and
the process will be aborted, otherwise the file will be created which
prevents any other pakfire instance to perform any operations until the
first process gets finished and the lock will be released again.

Because the release of the lock is located in an END block, the lock
also will be released in case the pakfire process gets interuped or
gains an error.

This prevents from an lock loop and an unuseable pakfire.

Reference: #12621.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/lib/functions.pl
src/pakfire/pakfire