Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 494934 - multibuild eclasses should use `flock` for locking
Summary: multibuild eclasses should use `flock` for locking
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-21 09:39 UTC by SpanKY
Modified: 2018-01-09 15:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2013-12-21 09:39:29 UTC
rather than the `ln` hack (which requires $BASHPID which is in bash-4.0+), it should simply use `flock`

(
flock -x 9 || die
... do stuff that needs the lock
) 9>/path/to/common/lock/file

bonus: this won't burn the cpu
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-12-21 09:46:28 UTC
Been there, Prefix was unhappy, bug #466554.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-11 16:40:07 UTC
We should probably go for a locking helper in eutils that has cases for multiple OS-es.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-02-23 22:06:36 UTC
(git-r3 no longer needs locking)
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-01-09 15:09:47 UTC
Locking is no longer used in the eclass.