diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-05-24 17:42:05 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-05-24 17:42:05 +0000 |
commit | b6904b525cd988630e34206a2496fcb4469cf6fa (patch) | |
tree | 821436c526a75f234817424b1a0275e21b96ca0d /eclass | |
parent | Version bump (diff) | |
download | historical-b6904b525cd988630e34206a2496fcb4469cf6fa.tar.gz historical-b6904b525cd988630e34206a2496fcb4469cf6fa.tar.bz2 historical-b6904b525cd988630e34206a2496fcb4469cf6fa.zip |
Fix the race condition in locking code by using $BASHPID instead of $$.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/multibuild.eclass | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index daae896cb557..e081b58517f6 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.836 2013/05/23 20:19:28 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.837 2013/05/24 17:42:05 mgorny Exp $ + + 24 May 2013; Michał Górny <mgorny@gentoo.org> multibuild.eclass: + Fix the race condition in locking code by using $BASHPID instead of $$. 23 May 2013; Michał Górny <mgorny@gentoo.org> multibuild.eclass: Use portable locking code from Fabian Groffen. Bug #466554. diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass index f515f7d60e35..3c9e40454e85 100644 --- a/eclass/multibuild.eclass +++ b/eclass/multibuild.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.10 2013/05/23 20:19:28 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.11 2013/05/24 17:42:05 mgorny Exp $ # @ECLASS: multibuild # @MAINTAINER: @@ -252,7 +252,7 @@ multibuild_merge_root() { local dest=${2} local lockfile=${T}/.multibuild_merge_lock - local lockfile_l=${lockfile}.${$} + local lockfile_l=${lockfile}.${BASHPID} local ret # Lock the install tree for merge. The touch+ln method ensures race |