Article View: comp.mail.misc
Article #5248Re: Mail locking...
From: Syd Weinstein
Date: Thu, 23 Mar 1989 13:12
Date: Thu, 23 Mar 1989 13:12
29 lines
2023 bytes
2023 bytes
In article <548@kl-cs.UUCP> jonathan@cs.keele.ac.uk (Jonathan Knight) writes:
>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.
Ok, here's a quick overview of locking for mail systems:
Systems that don't use flock() on the spool file itself, use a .lock
file. Where that file resides depends on the system.
It's difficult to tell which systems use flock and which use .lock if
the system has the flock system call, so most mail user agents use
both to be sure. You never know when someone puts an older style
user agent on an flock machine, so it doesn't hurt to do both.
BSD and Sys V.2 put the lock file in the mail directory. Xenix puts
it in /tmp and Sys V.3 puts it in the locks directory.
Elm uses both flock and .lock files whenever possible, and .lock
files if flock is not available.
--
=====================================================================
Sydney S. Weinstein, CDP, CCP Elm Coordinator
Datacomp Systems, Inc. Voice: (215) 947-9900
{allegra,bpa,vu-vlsi}!dsinc!syd FAX: (215) 938-0235
Technical Details
Message-ID:
<98@dsinc.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!cbmvax!vu-vlsi!dsinc!sydReferences:
<588@dtscp1.UUCP> <548@kl-cs.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!cbmvax!vu-vlsi!dsinc!syd From: syd@dsinc.UUCP (Syd Weinstein) Newsgroups: comp.mail.misc Subject: Re: Mail locking... Summary: Its best to do both Message-ID: <98@dsinc.UUCP> Date: 23 Mar 89 13:12:05 GMT References: <588@dtscp1.UUCP> <548@kl-cs.UUCP> Reply-To: syd@dsinc.UUCP (Syd Weinstein) Organization: Datacomp Systems, Inc., Huntingdon Valley, PA 19006 Lines: 29