* A question on File locking
@ 1998-02-11 5:00 Ramakrishna Nissankula
0 siblings, 0 replies; only message in thread
From: Ramakrishna Nissankula @ 1998-02-11 5:00 UTC (permalink / raw)
I have a question on file locking. Can anyone pl answer this by e-mail?
In UNIX, I can lock a file only after opening it for reading or writing.
What happens in the following scenario?
Process1 Process2
d = open(file for writing) d = open(file for writing)
mandatory lock the file mandatory lock the file
write sth write some other thing
unlock unlock
close close
The problem is that the process that locks first will lose its data
because the other process has opened the file for writing.
How can I get around this problem?
BR
Ramki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-02-11 5:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-02-11 5:00 A question on File locking Ramakrishna Nissankula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox