[comp.unix.i386] SCO XENIX 2.3.1 mail locking method

bt455s39@uhccux.uhcc.hawaii.edu (Carmen Hardina) (07/30/89)

Could someone please tell tell me which method SCO XENIX 386 System V 2.3.1
uses to interlock access to /usr/spool/mail/$USER.  Does it use the flock
system call?  is it even existent? (flock) ...or does it use a lock file
named /usr/spool/mail/$USER.lock?

The reason I ask, is because when I tried to make GNU Emacs 18.54 assuming
that there was a flock system call, it failed when trying to compile
movemail.c.  It had an unresolved external...  __flocking or something like
that.  Has anyone else experienced this problem?  If so, why did GNU make
the flock system call the default for XENIX 386 in s-xenix.h?

					Thanks in advance,
						--Carmen

-- 
Carmen Maria Hardina, University of Hawaii at Manoa...
UUCP: {uunet,ucbvax,dcdwest}!ucsd!nosc!uhccux!bt455s39
ARPA: uhccux!bt455s39@nosc.MIL BITNET: bt455s39@uhccux
INET: bt455s39@uhccux.UHCC.HAWAII.EDU <-- It may work.

chip@ateng.com (Chip Salzenberg) (08/11/89)

According to bt455s39@uhccux.uhcc.hawaii.edu (Carmen Hardina):
>Could someone please tell tell me which method SCO XENIX 386 System V 2.3.1
>uses to interlock access to /usr/spool/mail/$USER.  Does it use the flock
>system call?  is it even existent? (flock) ...or does it use a lock file
>named /usr/spool/mail/$USER.lock?

It uses a lock file called /tmp/user.mlk.  Actually, it generate the
lockfile name this way:

	sprintf(lockfile, "/tmp/%.10s.mlk", user);

So the lockfile for "long-username" is "/tmp/long-usern.mlk".  Just do
"strings /usr/lib/mail/mail.local" and you'll see the above format string.
-- 
You may redistribute this article only to those who may freely do likewise.
Chip Salzenberg         |       <chip@ateng.com> or <uunet!ateng!chip>
A T Engineering         |       Me?  Speak for my company?  Surely you jest!