Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site psuvax1.UUCP
Path: utzoo!watmath!clyde!bonnie!akgua!psuvax1!dae
From: dae@psuvax1.UUCP (David Eckhardt)
Newsgroups: net.unix-wizards
Subject: Re: More on 4.2 mail
Message-ID: <1581@psuvax1.UUCP>
Date: Sun, 9-Dec-84 20:10:20 EST
Article-I.D.: psuvax1.1581
Posted: Sun Dec  9 20:10:20 1984
Date-Received: Mon, 10-Dec-84 03:26:33 EST
References: <308@sdchema.UUCP>
Organization: Pennsylvania State Univ.
Lines: 22

> If you have a heavily loaded system and mail gets heavy use it's possible for
> user's mailboxes to get scrambled through two processes writing to it at once.
> Both sendmail and /bin/mail try to prevent this by establishing a lock file
> while they're rewriting the mail file.  Both (understandbly) have code that
> allows a process to break the lock after some number of seconds.  As we got
> it, however, /bin/mail's time limit was 30 seconds.
> 
> If anyone has a better fix I would much appreciate hearing about it.
> 
> 				John Pierce, Chemistry, UC San Diego
> 				{decvax,sdcsvax}!sdchema!jwp

I've been considering using (on 4.2 systems, anyway) the flock(2)
system call--that way you shouldn't have to worry about breaking locks
prematurely.  Can anybody think of any reason not to do this?

-- 

Spoken:  Dave Eckhardt        Summoned:  Daemon
Net: dae @ { psuvax1. { bitnet, uucp } , penn-state.csnet}

-> "I will have no covenants but proximities" <- Emerson