Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No subject

I'm not 100% sure of this in Linux, but flock(2) is an advisory lock, so 
that anyone can modify the file regardless of the lock state. 

I strongly recommend that you use fcntl(2) as your lock mechanism as it is=
semanticly and syntacticly standard across platforms. It locks across NFS.=
You can also lock a portion of a file.

On 18 Apr 2002 at 11:39, David Kramer wrote:

> If I use the UNIX call flock() to lock a file, then someone tries to 
> append to that file like
> 	ps >> myfile
> or
> 	ps > myfile
> Will the OS and shell respect the lock and block the write?
> ---
> DDDD   David Kramer                 
> DK KD  
> DKK D  So if you want to build a Nerf world with no sharp edges,
> DK KD  do it in Peoria.  I'm gonna go play with knives and
> DDDD   flirt with redheads.                           Bob MacDowell
> _______________________________________________
> Discuss mailing list
> Discuss at

Jerry Feldman <gaf at>
Associate Director
Boston Linux and Unix user group PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /