Subject: Is it dangerous to remove lock files in /usr/mail??

From: lara@cern04 (Lara Rios)
Date: 10 Nov 95 15:33:15 GMT

I understand that when a user logs out without first closing pine that a
lock file is created in /usr/mail.  Is this done because if you exit without
closing pine you have left your mailbox open and therefore unsecure and
the lock basically prevents anything from being done to this unsecure mailbox?

What would happen if I as a system administrator were to remove all lock files
regularly during the day so our users that logged off without closing pine
could still receive mail?  Is this a good idea?  I understand that the lock
files are there for a reason, but once they are removed than the users mail 
works fine again so I don't see what the problem would be with removing them
regularly (as root).

I would appreciate any feeback.

thanks,
Lara

Lara Rios                       Department of Computer Science
Sys Admin - Civil Eng Dept      University of Illinois at Urbana-Champaign
2143 Newmark Laboratory         num : (217) 333-3821
205 N. Mathews Ave.             E-mail : [email-masked]
Urbana, IL 61801                url : http://www.ce.uiuc.edu/~lara/home.html

---

From: Mark Crispin <[email-masked]>
Date: Mon, 13 Nov 1995 20:02:10 -0800

On 10 Nov 1995, Lara Rios wrote:
> lock file is created in /usr/mail.

This is incorrect.  If Pine crashes while it is reading the folder or
performing an update, a lock file will be left behind.  That is the only
time.  The lock files are created only when an actual file access is done,
and are removed immediately afterwards.

Lock files should be timed out (and ignored) by Pine and other mail
software after they are 5 minutes old.

If this is not happening, then something is wrong on your system and it
needs to be investigated and/or reported to [email-masked].

-- Mark --

DoD #0105, R90/6 pilot, FAX: (206) 685-4045  ICBM: N 47 39'35" W 122 18'39"
Science does not emerge from voting, party politics, or public debate.

---

From: Ian Russell Ollmann <[email-masked]>
Date: Mon, 13 Nov 1995 21:18:06 -0800

> I would appreciate any feeback.

I delete them regularly on our Silicon Graphics machine. If I didn't they
would number in the hundreds after a month or two. The other poster may
have been correct about how pine deals with these lock files, but my
experience has been along the same lines as yours. From my end, it *looks*
exectly like it leaves the lock files behind when a user logs out without
stopping pine or its window first, or hangs up the modem from his end
without quitting pine. On our machine, (once we did a few small code
changes -- 1 or 2 lines) the program has been rock stable, almost never
hanging up or crashing. Noone whose lock file I have deleted has
ever complained. 

				Ian Ollmann