There are two kinds of locks, so for interoperability, everyone has to
always take both kinds, to avoid the possibility of one client using one
kind and another client using another kind & missing each other. :(
I wonder what order we're supposed to take them in? If we don't all
agree, we get deadlocks! Here, I take them in alphabetical order
(fcntl then flock), in the hope of this being a legible Schelling point.
The test harness does exercise the "take locks in the 'wrong' order" case.
It probably deadlocks with some tiny probability on heavily-loaded
systems. Sorry. If this hurts you, feel free to remove it.