[70172] trunk/base/src/port1.0/portutil.tcl
jmr at macports.org
jmr at macports.org
Sat Jul 31 04:42:26 PDT 2010
Revision: 70172
http://trac.macports.org/changeset/70172
Author: jmr at 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
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100731/f1866072/attachment.html>
More information about the macports-changes
mailing list