summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-05-24 17:42:05 +0000
committerMichał Górny <mgorny@gentoo.org>2013-05-24 17:42:05 +0000
commit638f3c0a94774c5b24876d2ce93e71b2d0f869d4 (patch)
tree9894abdf9c527650d8c7b82455c4736d55adc8ae /eclass
parentVersion bump (diff)
downloadgentoo-2-638f3c0a94774c5b24876d2ce93e71b2d0f869d4.tar.gz
gentoo-2-638f3c0a94774c5b24876d2ce93e71b2d0f869d4.tar.bz2
gentoo-2-638f3c0a94774c5b24876d2ce93e71b2d0f869d4.zip
Fix the race condition in locking code by using $BASHPID instead of $$.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/multibuild.eclass4
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