*BSD News Article 8296


Return to BSD News archive

Xref: sserve comp.sys.hp:19193 comp.unix.sys5.misc:71 comp.unix.bsd:8349
Path: sserve!manuel.anu.edu.au!munnari.oz.au!network.ucsd.edu!sdd.hp.com!spool.mu.edu!yale.edu!yale!gumby!destroyer!ncar!vexcel!copper!slate!mbarkah
From: mbarkah@slate.mines.colorado.edu (Ade Barkah)
Newsgroups: comp.sys.hp,comp.unix.sys5.misc,comp.unix.bsd
Subject: Re: Flock in HP-UX / SV based systems
Message-ID: <1992Nov24.135533.33376@slate.mines.colorado.edu>
Date: 24 Nov 92 13:55:33 GMT
References: <1992Nov24.101411.3211@hp9000.csc.cuhk.hk>
Organization: Colorado School of Mines
Lines: 21

a866700@hp9000.csc.cuhk.hk (Wong Siu To) writes:
: Could anyone pls tell me how can I use flock(2) on HP-UX 8.07 or other
: System V based systems ?  It seems that HP-UX doesn't get this function
: call, plus the header <sys/file.h>.
: 
: I want to port a program runs on Ultrix, which uses flock.  How can I
: get it run by modifying the call to flock ?

I'm not familiar with BSD systems.... what does flock() do ? If
it is to lock a file or record, you may want to check out lockf()
in sysV systems. There is a function called F_LOCK for exclusive
record use. The header would be <unistd.h>.

Sorry I can't give you a definitive answer.. hopefully that's even
in the correct ``ballpark''.


-Ade.
-- 
Internet  : mbarkah@slate.mines.colorado.edu    (NeXT Mailable)
CompuServe: 74160,3404