Revision: 70172 http://trac.macports.org/changeset/70172 Author: jmr@macports.org Date: 2010-07-31 04:42:23 -0700 (Sat, 31 Jul 2010) Log Message: ----------- don't call flock on statefile twice when not needed Modified Paths: -------------- trunk/base/src/port1.0/portutil.tcl Modified: trunk/base/src/port1.0/portutil.tcl =================================================================== --- trunk/base/src/port1.0/portutil.tcl 2010-07-31 11:03:32 UTC (rev 70171) +++ trunk/base/src/port1.0/portutil.tcl 2010-07-31 11:42:23 UTC (rev 70172) @@ -1579,6 +1579,7 @@ if {[catch {flock $fd -exclusive -noblock} result]} { if {"$result" == "EAGAIN"} { ui_msg "Waiting for lock on $statefile" + flock $fd -exclusive } elseif {"$result" == "EOPNOTSUPP"} { # Locking not supported, just return return $fd @@ -1586,7 +1587,6 @@ return -code error "$result obtaining lock on $statefile" } } - flock $fd -exclusive } return $fd }
participants (1)
-
jmr@macports.org