bug in /bin/mail

utzoo!decvax!watmath!dmmartindale utzoo!decvax!watmath!dmmartindale
Mon Mar 1 11:43:45 AEST 1982


If you have done a "biff y", you always get some kind of notice when
new mail arrives for you, but the first few lines of the message body
do not always appear (particularly when the system is busy).  The fix
is to move the "fclose(malf)" ahead a few lines in mail.c so that the
output buffer is flushed and written into your mailbox BEFORE sending
notification to /etc/comsat.

					Dave Martindale

diff $cmd/mail.c.old $cmd/mail.c
682,685c682,683
< 	{
< 		f = open("/dev/mail", 1);
< 		sprintf(buf, "%s@%d\n", name, ftell(malf)); 
< 	}
---
> 	f = open("/dev/mail", 1);
> 	sprintf(buf, "%s@%d\n", name, ftell(malf)); 
686a685
> 	fclose(malf);
691d689
< 	fclose(malf);



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