Trouble at the post office

utzoo!decvax!yale-com!brunix!mjb utzoo!decvax!yale-com!brunix!mjb
Wed Feb 23 12:50:04 AEST 1983


Re: a bug in mailing on 4.1BSD where simultaneous mailings mung the mailbox.
I had complaints of the same problem, although I had never seen it. I have had
no complaints after I made this fix to /usr/src/cmd/mail.c. You might also
want to increase the time before deciding a lock is dead if you are paranoid
(we upped it to 90 from 30, sometimes our system gets REAL SLOW).
	.
	.
	.
send(n, name, fromaddr)
int n;
char *name;
char *fromaddr;
{
		.
		.
		.
	mask = umask(MAILMODE);
	lock(file);			/*BRUNIX*/
	malf = fopen(file, "a");
	umask(mask);
	if (malf == NULL) {
		unlock();		/*BRUNIX*/
		fprintf(stdout, "mail: cannot append to %s\n", file);
		return(0);
	}
/*****	lock(file);		      ****BRUNIX*/
		.

-Mike Braca, Brown CS, ..!decvax!brunix!mjb, mjb.brown at udel-relay



More information about the Comp.bugs.4bsd.ucb-fixes mailing list