diff options
author | Richard M. Stallman <rms@gnu.org> | 1991-07-25 05:31:52 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1991-07-25 05:31:52 +0000 |
commit | eef9ac242b868c9ece1d75352074c2201e2684cb (patch) | |
tree | 04fe86f2e0dfa1278f3e164533349770e015e658 /lib-src | |
parent | 97f49c764d695eec55983ec148d80ef47476dff6 (diff) | |
download | emacs-eef9ac242b868c9ece1d75352074c2201e2684cb.tar.gz |
*** empty log message ***
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/movemail.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 9709202e131..8e3c0e7dd19 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -144,6 +144,27 @@ main (argc, argv) #ifndef MAIL_USE_FLOCK /* Use a lock file named /usr/spool/mail/$USER.lock: If it exists, the mail file is locked. */ + /* Note: this locking mechanism is *required* by the mailer + (on systems which use it) to prevent loss of mail. + + On systems that use a lock file, extracting the mail without locking + WILL occasionally cause loss of mail due to timing errors! + + So, if creation of the lock file fails + due to access permission on /usr/spool/mail, + you simply MUST change the permission + and/or make movemail a setgid program + so it can create lock files properly. + + You might also wish to verify that your system is one + which uses lock files for this purpose. Some systems use other methods. + + If your system uses the `flock' system call for mail locking, + define MAIL_USE_FLOCK in config.h or the s-*.h file + and recompile movemail. If the s- file for your system + should define MAIL_USE_FLOCK but does not, send a bug report + to bug-gnu-emacs@prep.ai.mit.edu so we can fix it. */ + lockname = concat (inname, ".lock", ""); strcpy (tempname, inname); p = tempname + strlen (tempname); @@ -160,7 +181,7 @@ main (argc, argv) /* Give up if cannot do that. */ desc = open (tempname, O_WRONLY | O_CREAT, 0666); if (desc < 0) - pfatal_with_name (concat ("temporary file \"", tempname, "\"")); + pfatal_with_name ("lock file--see source file etc/movemail.c"); close (desc); tem = link (tempname, lockname); |