rscott@eta.unix.ETA.COM (Rich Scott) (02/11/89)
(I'm sure this has been addressed before, but here goes:) We have a situation on our network where we mount bigserver:/usr/spool/mail on all our workstations via NFS. While using ELM2.1, I noticed that I could read my mail on my workstation, and while leaving that session of elm going, I could run elm on a different machine, to read new mail in my (the same) mailbox. Are there any patches/releases that use, say, lockf(3) or fcntl(2) to lock /usr/spool/mail/username so that only one instance of elm _on the network_ can read and modify it? Currently, elm only does this right for two simultaneous sessions on the same machine. Thanks ... ---------- rich scott (612) 642-8404 internet: rscott@unix.eta.com eta systems, st. paul, mn uucp: {amdahl,rutgers}!bungia!eta!rscott "I've been on a calendar, but never on time" - Marilyn Monroe
rob@pbhyf.PacBell.COM (Rob Bernardo) (02/11/89)
In article <2434@eta.unix.ETA.COM> rscott@eta.unix.ETA.COM (Rich Scott) writes:
+ Are there any patches/releases that use, say, lockf(3) or
+fcntl(2) to lock /usr/spool/mail/username so that only one instance
+of elm _on the network_ can read and modify it? Currently, elm only
+does this right for two simultaneous sessions on the same machine.
+Thanks ...
Well, you can't use file locking because on some systems file locking
is used to lock the mail file against updates to the mail file; you
don't want it locked against new mail coming in the whole time you're
using elm.
I don't know about previous versions of ELM, but ELM 2.2 can be
configured with a non-default directory for temporary files (default =
/tmp on most systems). This is the directory where elm creates the
file that locks against multiple sessions with the same mail file.
What you would need to do is configure ELM so that the directory for
temporary files is one shared between all systems that can acces the
mail spool directory.
--
Rob Bernardo, Pacific Bell UNIX/C Reusable Code Library
Email: ...![backbone]!pacbell!pbhyf!rob OR rob@pbhyf.PacBell.COM
Office: (415) 823-2417 Room 4E750A, San Ramon Valley Administrative Center
Residence: (415) 827-4301 R Bar JB, Concord, California