Article View: comp.mail.misc
Article #5244Re: Mail locking...
From: Jonathan Knight
Date: Wed, 22 Mar 1989 14:54
Date: Wed, 22 Mar 1989 14:54
29 lines
1994 bytes
1994 bytes
From article <588@dtscp1.UUCP>, by scott@dtscp1.UUCP (Scott Barman):
> I am trying to write some software for mail that will interact with our
> internal network and must co-exist with the mailers on our bsd-based
> systems (actually, SunOS 3.5 and SunOS 4.0) and with a System V Release
> 3.2 system. I need to know how these systems lock the mail file.
> Does /usr/.../*.lock work on both of these? I know that our v7-like
> system uses the execute bit, but I do not have the sources to the other
> systems.
I would like to see this posted as its a problem I just bumped into. I
was installing 'mush' which has just appeared in comp.sources.unix and
I noted that it would lock the mail files by using the *.lock method
and by using flock(). I wanted it to work the same way the BSD 'mail'
worked so I read up on the manual pages. The manual for /bin/mail said
it used the *.lock method but the manual for '/usr/ucb/mail' didn't
mention any method of mailbox locking. Seeing as /usr/ucb/mail isn't
a setuid program I assume that it doesn't perform the same locking as
/bin/mail as users don't have write access to /usr/spool/mail. If
this is the case how does /usr/ucb/mail and /bin/mail avoid writing
to the users mailbox at the same time?
This is an Ultrix 1.2 machine. (BSD 4.2 ish)
--
______ JANET :jonathan@uk.ac.keele.cs Jonathan Knight,
/ BITNET:jonathan%cs.kl.ac.uk@ukacrl Department of Computer Science
/ _ __ other :jonathan@cs.keele.ac.uk University of Keele, Keele,
(_/ (_) / / UUCP :...!ukc!kl-cs!jonathan Staffordshire. ST5 5BG. U.K.
Technical Details
Message-ID:
<548@kl-cs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!kl-cs!jonathanReferences:
<588@dtscp1.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!kl-cs!jonathan From: jonathan@cs.keele.ac.uk (Jonathan Knight) Newsgroups: comp.mail.misc Subject: Re: Mail locking... Message-ID: <548@kl-cs.UUCP> Date: 22 Mar 89 14:54:42 GMT References: <588@dtscp1.UUCP> Organization: University of Keele, England Lines: 29