Use lockf over flock.
Use lockf over flock.

This is a preventative change; w/ flock, across forks the lock
state is shared/inherited.  Thus a child holds the same lock state
as the parent, and when the child mutates that state, it mutates the
parents state at the same time.  This means a child can unlock something
underneath the parents feet, generally undesirable.

This, and other reasons are why flock sucks.  Just use lockf instead,
which is a poorly named python construct referring to using fcntl w/
F_*LCK flags.

BUG=None
TEST=None

Change-Id: I5550b7d2d8b6b7b1f81e8115c31b45d8c90b019d
Reviewed-on: https://gerrit.chromium.org/gerrit/17333
Tested-by: Brian Harring <fdc2d0a2e2340b623587cee5ea8dff425d1eb1f3@chromium.org>
Reviewed-by: David James <f231dc574bbeb62604660cbc162d1b8642a0a3af@chromium.org>
Commit-Ready: Brian Harring <fdc2d0a2e2340b623587cee5ea8dff425d1eb1f3@chromium.org>

chadversary/chromiumos.chromite,coreos/chromite,bpsinc-native/src_third_party_chromite,zhang0137/chromite,zhang0137/chromite,bpsinc-native/src_third_party_chromite,zhang0137/chromite,coreos/chromite,chadversary/chromiumos.chromite,coreos/chromite,bpsinc-native/src_third_party_chromite