]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commit
pakfire: Prevent from get launched multiple times.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 24 May 2021 16:16:45 +0000 (18:16 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Mon, 24 May 2021 16:16:45 +0000 (18:16 +0200)
commitf7d56a2fe0ca8c24fd8258e076eca88490ce5246
treebf9c4db2c4927aaae78b9a7da7b6d971897f799d
parent495cf3e0b4f6ff4504fae5e45b86df94c1784d23
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>
src/pakfire/lib/functions.pl
src/pakfire/pakfire