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 | Linux Links | Bling | About BLU

BLU Discuss list archive


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

flock() question



On Thu, Apr 18, 2002 at 11:39:03AM -0400, 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?

No. flock() is an advisory lock, intended to be used with cooperating
processes.




Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org