Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!sdd.hp.com!spool2.mu.edu!uunet!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: While learning PERL... a suggestion Keywords: perl file learn suggest Message-ID: <1991Jan22.054732.14797@convex.com> Date: 22 Jan 91 05:47:32 GMT References: <119430@uunet.UU.NET> <1991Jan21.214453.25039@convex.com> <119440@uunet.UU.NET> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 25 Nntp-Posting-Host: pixel.convex.com From the keyboard of rbj@uunet.UU.NET (Root Boy Jim): :>:Another thing perl needs is the ability to create lock files. Sysopen? :> :>flock() is there, as is lockf() disguised as fcntl(). : :Pardon me. I didn't make myself clear. I need to create lock files, :not lock files already created. I meant open(path,O_CREAT|O_EXCL,0666); With NFS, all bets are off: the same file may be created and deleted more than once, with success returned to both. It's horrid, I know, but it's there. Too many of us use NFS to rely on this. Anyway aren't you "supposed" to use link, not creat, for creating lock files of this nature? I'm not saying we really don't need a sysopen -- some other flags (like NDELAY) might be nice. Just that for locking this isn't really great. If you have syscall(), you could probably put something together without code changes. --tom -- "Hey, did you hear Stallman has replaced /vmunix with /vmunix.el? Now he can finally have the whole O/S built-in to his editor like he always wanted!" --me (Tom Christiansen )