can easily find out what locking method was configured in.
-.TH MH-MAIL %manext5% "March 3, 2013" "%nmhversion%"
+.TH MH-MAIL %manext5% "March 5, 2013" "%nmhversion%"
.B nmh
folder corresponds to directory. There are no limits on folder
names beyond those of the host filesystem.
.B nmh
folder corresponds to directory. There are no limits on folder
names beyond those of the host filesystem.
.RE
.PP
.B one message per file
.RE
.PP
.B one message per file
.PP
The filename for a new
message is one greater than the highest numbered message in
.PP
The filename for a new
message is one greater than the highest numbered message in
-the folder; its full path can be accessed by the pseudo\-sequence
+the folder; its full path can be accessed by the pseudo\-sequence
that accesses these files must be sure to lock them using the same
locking method. The locking method is selected when
.B nmh
that accesses these files must be sure to lock them using the same
locking method. The locking method is selected when
.B nmh
-is configured. 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
+is configured and can be accessed as a string using
+.BR "mhparam lockmethod" .
+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
.B mail
program, if provided on the platform.
.B mail
program, if provided on the platform.
-.I Should we add a lockmethod component to mhparam so users can easily detect it?
.SH "SEE ALSO"
.I
.IR mail (1),
.SH "SEE ALSO"
.I
.IR mail (1),
.IR mh\-path (1),
.IR mh\-profile (5),
.IR mh\-sequence (5)
.IR mh\-path (1),
.IR mh\-profile (5),
.IR mh\-sequence (5)
-install directories and all
+install directories, all
+settings, and the locking method with which the
+.B nmh
+installation was configured. The
.B \-debug
switch displays all such other information available from
.BR mhparam .
.B \-debug
switch displays all such other information available from
.BR mhparam .
% mhparam libdir
%libdir%
% mhparam libdir
%libdir%
+
+% mhparam lockmethod
+fcntl
-extern char *mhlibdir;
-extern char *mhetcdir;
-
-char *sbackup = BACKUP_PREFIX;
-
#define MHPARAM_SWITCHES \
X("components", 0, COMPSW) \
X("nocomponents", 0, NCOMPSW) \
#define MHPARAM_SWITCHES \
X("components", 0, COMPSW) \
X("nocomponents", 0, NCOMPSW) \
DEFINE_SWITCH_ARRAY(MHPARAM, switches);
#undef X
DEFINE_SWITCH_ARRAY(MHPARAM, switches);
#undef X
+extern char *mhlibdir;
+extern char *mhetcdir;
+
+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
+ ;
+
struct proc {
char *p_name;
char **p_field;
struct proc {
char *p_name;
char **p_field;
{ "etcdir", &mhetcdir },
{ "libdir", &mhlibdir },
{ "sbackup", &sbackup },
{ "etcdir", &mhetcdir },
{ "libdir", &mhlibdir },
{ "sbackup", &sbackup },
+ { "lockmethod", &lockmethod },