From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,a91218dc783abc21,start X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,a91218dc783abc21,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-09-16 16:59:05 PST Xref: gmd.de comp.sys.dec:10187 comp.os.vms:30801 Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!sol.ctr.columbia.edu!news.kei.com!ub!dsinc!widener!usenet From: YOUNG@tattoo.cs.widener.edu (Rob Young) Newsgroups: comp.sys.dec,comp.os.vms Subject: lockf equivalent on VMS Date: 16 Sep 1993 21:05:28 GMT Organization: Widener News/Mail Gateway Distribution: world Message-ID: <27akeo$5ga$1@cs.widener.edu> NNTP-Posting-Host: tattoo.cs.widener.edu X-News-Reader: VMS NEWS 1.20 I tried asking about this earlier with no results. Basically we are testing for exclusive access to a file. On the Un*x side it is something like: lock = (fd, F_TEST, 0) fd may or may not be opened and we have to verify that we are the only ones looking at it. The file on the VMS side is opened shr=put among other flags. Thought that trying a shr=nil on it would work but alas if the file is already opened this returns success. So... I am trying to come up with a scheme that bypasses going back and adding DEQ, ENQ stuff everywhere. One idea is to do a DCL call to "show dev/files/nosys" and if that file appears there, then someone has it open. This is not elegant but would get the job done. Any ideas on a cleaner method? Thanks, Rob young@tattoo.cs.widener.edu "Any escape might help to smooth the unattractive truth but the suburbs have no charm to soothe the restless dreams of youth." -- Neil Peart"