[comp.bugs.4bsd] Mail not removing lock files

hedrick@athos.rutgers.edu (Charles Hedrick) (07/27/88)

problem:

users complain that when they exit from Mail, sometimes it hangs for
5 minutes.

diagnosis:

Under the right phase of the moon, Mail is creating
/usr/spool/mail/foo.lock, and not removing it.

cure:

in aux.c, at the end of the routine alter, there is an "exit(0);"
This seems totally spurious.  It cause the program to exit,
so the routine never returns to its caller to do unlock.  I think
one could simply remove the exit, though it is probably better
to close the file descriptor openned just above.  I don't
don't understand why this problem just started showing up.
(We don't use the utime code because we read mail via NFS.
The time can be different on our machine and the file server.
It's safer to do I/O and let the file server set the times.)