Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!jhunix!andy From: andy@jhunix.HCF.JHU.EDU (Andy S Poling) Newsgroups: comp.mail.elm Subject: Re: Will ELM ever use lockf()? Summary: be careful... Keywords: lockf, flock, fcntl, mailbox locking Message-ID: <7857@jhunix.HCF.JHU.EDU> Date: 29 Mar 91 17:31:51 GMT References: <1991Mar25.193741.12360@coplex.uucp> <5062@lgnp1.ls.com> Followup-To: comp.mail.elm Organization: The Johns Hopkins University - HCF Lines: 28 In article <5062@lgnp1.ls.com> phil@ls.com (Phil Eschallier) writes: >In article <1991Mar25.193741.12360@coplex.uucp> dean@coplex.uucp (Dean Brooks) writes: [...] >> If elm were to support "lockf()" all my problems would be gone. Are >>there any hopes in the future of this being included in the elm source? >> > > correct me if i am wrong but this seems like a trivial problem -- > there are several places to get code that emulates flock() using > lockf(). [..] > then -- couldn't you just tell elm's configuration that you will > use flock() and link in this procedure ?? Be careful - lockf requires that a file be opened for both read and write. Really should use the fcntl(F_SETLK), etc. (which is what most lockf()s use anyway...). IMHO Elm should offer lockf() as one of the locking options - that's what our SYSV local mailer uses. It ain't gonna do much good to lock the mailbox if the mailer and Elm are usin' different locking methods... -Andy -- Andy Poling Internet: andy@gollum.hcf.jhu.edu UNIX Systems Programmer Bitnet: ANDY@JHUNIX Homewood Academic Computing Voice: (301)338-8096 Johns Hopkins University UUCP: uunet!mimsy!aplcen!jhunix!andy