From: Eric Gillespie Date: Sat, 6 Dec 2014 00:23:02 +0000 (-0800) Subject: only supporting fcntl lock, so bail out if mh doesn't use that X-Git-Url: https://diplodocus.org/git/minc/commitdiff_plain/04b8c7423ed0249a028dff1c245f4c90a88b6ea4?hp=4e91f43e28bce5f4825202d86297c8d2dbc3aa8c only supporting fcntl lock, so bail out if mh doesn't use that --- diff --git a/minc b/minc index be32d8f..2f3820e 100755 --- a/minc +++ b/minc @@ -194,6 +194,15 @@ if (!$mh) { $ENV{"MHCONTEXT"} = $mh . '/.minc.context'; +# TODO: Support dot-locking too. This works on FreeBSD and Linux. +my $locking = `mhparam datalocking`; +$? < 0 && die; +$? == 0 || die('mhparam datalocking: ' . exit_msg($?)); +chomp($locking); +if ($locking ne 'fcntl') { + die("mh locking $locking not supported; only fcntl"); +} + ############################################################################### # Utility procedures