Scott Worley [Wed, 13 Sep 2023 21:56:30 +0000 (14:56 -0700)]
Also take flock locks
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.
Scott Worley [Mon, 4 Sep 2023 00:50:46 +0000 (17:50 -0700)]
Encode time in time-logger's format
This is not a good format. It looses timezone information during daylight
savings time changes -- it cannot distinguish between the first 01:30
and the second 01:30 during the fall transition.