of locking methods into datalocking and spoollocking.
auxexecdir="$(auxexecdir)" bindir="$(bindir)" \
mandir="$(mandir)" sysconfdir="$(sysconfdir)" \
supported_locks="$(supported_locks)" \
+ default_locking="${default_locking}" \
MULTIBYTE_ENABLED=$(MULTIBYTE_ENABLED) \
ICONV_ENABLED=$(ICONV_ENABLED) \
$(TESTS_SHELL) ## Keep at end of TESTS_ENVIRONMENT.
-.TH MH-FOLDERS %manext5% "February 23, 2014" "%nmhversion%"
+.TH MH-FOLDERS %manext5% "February 26, 2014" "%nmhversion%"
.\"
.\" %nmhwarning%
.\"
that accesses these files must be sure to lock them using the same
locking method as
.BR nmh .
-The locking method is selected when
+The default data locking method is selected when
.B nmh
is configured and can be accessed as a string using
-.BR "mhparam lockmethod" .
+.BR "mhparam datalocking" .
+By default, fcntl locking is used, but this may be overridden with
+the
+.B datalocking
+profile entry.
+.PP
+A second, possibly different, locking method is used by
+.BR inc (1)
+when accessing the user's mail spool file or by
+.B nmh
+programs that open any mbox file. This locking method is selected
+when
+.B nmh
+is configured and can be accessed as a string using
+.BR "mhparam spoollocking" .
By default, kernel-level locking is used if appropriate for the
platform, and it is for popular platforms. That default should also
be the same as used by the
-.TH MHPARAM %manext1% "November 6, 2012" "%nmhversion%"
+.TH MHPARAM %manext1% "February 26, 2014" "%nmhversion%"
.\"
.\" %nmhwarning%
.\"
.I libdir
install directories, all
.I proc
-settings, and the locking method with which the
+settings, and the default locking method with which the
.B nmh
installation was configured. The
.B \-debug
% mhparam libdir
%libdir%
-% mhparam lockmethod
+% mhparam datalocking
fcntl
+
+% mhparam spoollocking
+flock
.fi
.RE
.PP
test -z "$mandir" && mandir="@mandir@"
test -z "$sysconfdir" && sysconfdir="@sysconfdir@"
test -z "$supported_locks" && supported_locks="@supported_locks@"
+test -z "$default_locking" && default_locking="@default_locking@"
test -z "$MULTIBYTE_ENABLED" && MULTIBYTE_ENABLED="@MULTIBYTE_ENABLED@"
test -z "$ICONV_ENABLED" && ICONV_ENABLED="@ICONV_ENABLED@"
export MH_TEST_DIR auxexecdir bindir mandir sysconfdir
$bindir/whom
$sysconfdir
${MH_LIB_DIR}
+fcntl
+${default_locking}
EOF
run_prog mhparam -nocomponent \
whatnowproc \
whomproc \
etcdir \
-libdir >$actual 2>&1
+libdir \
+datalocking \
+spoollocking >$actual 2>&1
check $expected $actual
char *sbackup = BACKUP_PREFIX;
-char *lockmethod =
-#if defined FCNTL_LOCKING
- "fcntl"
-#elif defined FLOCK_LOCKING
- "flock"
-#elif defined LOCKF_LOCKING
- "lockf"
-#elif defined DOT_LOCKING
- "dot"
-#else
- "none"
-#endif
- ;
+char *datalocking = "fcntl";
+
+extern char *spoollocking;
char *sasl =
#ifdef CYRUS_SASL
{ "etcdir", &mhetcdir },
{ "libdir", &mhlibdir },
{ "sbackup", &sbackup },
- { "lockmethod", &lockmethod },
+ { "datalocking", &datalocking },
+ { "spoollocking", &spoollocking },
{ "sasl", &sasl },
{ "tls", &tls },
{ NULL, NULL },
} else if (debug) {
struct proc *ps;
+ /* Need to see if datalocking was set in profile. */
+ if ((cp = context_find("datalocking"))) { datalocking = cp; }
+
/*
* Print the current value of everything in
* procs array. This will show their current
missed++;
}
}
-
+
done (missed);
return 1;
}