Results 1 to 2 of 2
hi all
how can i lock, a file(name.txt) using c.(programatically)
and unlock.
help me
thank you in advance...
- 05-18-2007 #1Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
lock and unlock
hi all
how can i lock, a file(name.txt) using c.(programatically)
and unlock.
help me
thank you in advance"Relationships are built on trust and communication"
- 05-18-2007 #2Linux User
- Join Date
- Oct 2004
- Location
- /dev/random
- Posts
- 404
Read fcntl man page - especially options F_SETLK/F_GETLK.
Mind you, by default it is advisory locking - not enforced.
For mandatory (forced) locking, you need support from the underlying filesystem. Read further down in the page I gave link for.The Unforgiven
Registered Linux User #358564


Reply With Quote