SCO XENIX 2.3.1 mail locking method

Chip Salzenberg chip at ateng.com
Fri Aug 11 03:52:53 AEST 1989


According to bt455s39 at 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 at ateng.com> or <uunet!ateng!chip>
A T Engineering         |       Me?  Speak for my company?  Surely you jest!



More information about the Comp.unix.xenix mailing list