no mail directory
Andy Wai
accwai at maytag.waterloo.edu
Sat Sep 16 01:15:30 AEST 1989
In article <16416 at watdragon.waterloo.edu> dgcasperson at violet.waterloo.edu (david Casperson) writes:
>
>One problem with this is that emacs rmail and perhaps other programs
>don't know that they are supposed to leave the spool file empty, so
>they go ahead and kill the spool file. [...]
That's not entirely true. The following is the code in etc/movemail.c
that closes the inbox:
#ifdef MAIL_USE_FLOCK
#if defined(STRIDE) || defined(XENIX)
/* Stride, xenix have file locking, but no ftruncate. This mess will do. */
(void) close (open (inname, O_CREAT | O_TRUNC | O_RDWR, 0666));
#else
(void) ftruncate (indesc, 0L);
#endif /* STRIDE or XENIX */
#endif /* MAIL_USE_FLOCK */
close (indesc);
#ifndef MAIL_USE_FLOCK
/* Delete the input file; if we can't, at least get rid of its contents. */
if (unlink (inname) < 0)
if (errno != ENOENT)
creat (inname, 0666);
(void) unlink (lockname);
#endif /* not MAIL_USE_FLOCK */
If MAIL_USE_FLOCK is defined, then the file "inname" will get truncated.
In our case, the local sendmail doesn't use flock(). So, MAIL_USE_FLOCK
is not defined and "inname" got deleted. I've been wondering about this,
but the choice seem quite deliberate. That's why I never bother to change
the behavior.
I use rmail and from myself, and I realize how much of a hassle it is. But
you can aways get from to shut up by redirecting stderr to /dev/null.
Andy
More information about the Comp.unix
mailing list