aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman1991-07-25 05:31:52 +0000
committerRichard M. Stallman1991-07-25 05:31:52 +0000
commit06000e3c7210cf71151f1f86184ce2430dc33d77 (patch)
tree6d74fafa70572a918c1a7db783bbcf5bbe6e1d56 /lib-src
parent9b7828a5ad16b476e9359bfbe020e0bbc6cf3831 (diff)
downloademacs-06000e3c7210cf71151f1f86184ce2430dc33d77.tar.gz
emacs-06000e3c7210cf71151f1f86184ce2430dc33d77.zip
*** empty log message ***
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/movemail.c23
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)
144#ifndef MAIL_USE_FLOCK 144#ifndef MAIL_USE_FLOCK
145 /* Use a lock file named /usr/spool/mail/$USER.lock: 145 /* Use a lock file named /usr/spool/mail/$USER.lock:
146 If it exists, the mail file is locked. */ 146 If it exists, the mail file is locked. */
147 /* Note: this locking mechanism is *required* by the mailer
148 (on systems which use it) to prevent loss of mail.
149
150 On systems that use a lock file, extracting the mail without locking
151 WILL occasionally cause loss of mail due to timing errors!
152
153 So, if creation of the lock file fails
154 due to access permission on /usr/spool/mail,
155 you simply MUST change the permission
156 and/or make movemail a setgid program
157 so it can create lock files properly.
158
159 You might also wish to verify that your system is one
160 which uses lock files for this purpose. Some systems use other methods.
161
162 If your system uses the `flock' system call for mail locking,
163 define MAIL_USE_FLOCK in config.h or the s-*.h file
164 and recompile movemail. If the s- file for your system
165 should define MAIL_USE_FLOCK but does not, send a bug report
166 to bug-gnu-emacs@prep.ai.mit.edu so we can fix it. */
167
147 lockname = concat (inname, ".lock", ""); 168 lockname = concat (inname, ".lock", "");
148 strcpy (tempname, inname); 169 strcpy (tempname, inname);
149 p = tempname + strlen (tempname); 170 p = tempname + strlen (tempname);
@@ -160,7 +181,7 @@ main (argc, argv)
160 /* Give up if cannot do that. */ 181 /* Give up if cannot do that. */
161 desc = open (tempname, O_WRONLY | O_CREAT, 0666); 182 desc = open (tempname, O_WRONLY | O_CREAT, 0666);
162 if (desc < 0) 183 if (desc < 0)
163 pfatal_with_name (concat ("temporary file \"", tempname, "\"")); 184 pfatal_with_name ("lock file--see source file etc/movemail.c");
164 close (desc); 185 close (desc);
165 186
166 tem = link (tempname, lockname); 187 tem = link (tempname, lockname);