From: Juliusz Chroboczek Date: Mon, 09 May 2005 22:46:10 GMT Subject: Re: Darcs-git: a few notes for Git hackers Message-ID: <7ipsw010i5.fsf@lanthane.pps.jussieu.fr> In-Reply-To: <427FE248.7040403@zytor.com> >> I see. Let me know if you decide to use a different name for the >> lock file so I can switch to using the same one as yours. > Are you using flock(), or some other contraption that breaks if a > process dies unexpectedly? No, I'm using a file that is created by the NFS-safe equivalent of open(O_CREAT | O_EXCL). This is what Darcs has been doing basically forever. Darcs usually doesn't die unexpectedly -- it's a Haskell program, so bugs usually manifest themselves with an exception being thrown allowing Darcs to clean-up after itself. The one exception is when Darcs gets killed by the OOM killer (which, as you doubtless know, doesn't give any advance warning to a process, thus making it impossible for a process to deal with it gracefully). In such cases, manual intervention is necessary anyway -- a file could have been written half-way. Juliusz