Thanks! As you said: "You gotta know where to look." I didn't. -- John McKown Systems Engineer IV IT
Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell [email protected] * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM > -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[email protected]] On Behalf Of Thomas David Rivers > Sent: Friday, July 02, 2010 8:32 AM > To: [email protected] > Subject: Re: Unix systems and Serialization mechanism > > I believe the advisory locking is very "old hat" (i.e. > BSD 2, SYSV, etc...), and the more modern/proper way > to get a file lock is to use: > > fcntl(fd, F_GETLK, ...); > > fcntl(fd, F_SETLK, ...); > > This is not an 'advisory lock' like flock(), but a lock > in the operating/file system. > > > fcntl() should be supported by the underlying file system > and is supported across networking (NFSv3 and later, I believe > and SMB.) > > So - I believe, UNIX does have this facility. Just one > of those "gotta know where to look" situations. > > Check out the 'man page' for fcntl(2) for more details. > > - Dave Rivers - > > > zMan wrote: > > What is the overall locking mechanism? If program A is > reading /some/file > > and program B does a rm on it, what happens? From observed > behavior, I think > > the file doesn't go away until A is done with it. I'm told that: > > > > Unix uses shared memory and mutex locks to ensure that > files are locked > > between processes. How was that implemented on z/OS? > > ...and I'd like to understand it more. Anyone have any pointers? > > > > On Fri, Jul 2, 2010 at 8:19 AM, McKown, John > > <[email protected]>wrote: > > > > > >>>-----Original Message----- > >>>From: IBM Mainframe Discussion List > >>>[mailto:[email protected]] On Behalf Of Itschak Mugzach > >>>Sent: Friday, July 02, 2010 7:13 AM > >>>To: [email protected] > >>>Subject: Unix systems and Serialization mechanism > >>> > >>>I am looking for a product that will serialize access to file > >>>(like the > >>>Enqueue/Dequeue in GRS) in Unix systems. Does this animal exist? > >>> > >>>ITschak > >> > >>No. UNIX does not have that functionality. I've looked for > it. The closest > >>is called an "advisory lock". This is the flock() function > in UNIX. But all > >>programs which access the file must code the flock() themselves. > >> > >>http://linux.about.com/library/cmd/blcmdl2_flock.htm > >> > > > -- > [email protected] Work: (919) 676-0847 > Get your mainframe programming tools at http://www.dignus.com > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

