File locking

Mavroyanopoulos Nikos nmav at hellug.gr
Thu Aug 26 14:04:59 EEST 1999


On Wed, Aug 25, 1999 at 09:39:11PM +0300, Michalis Kabrianis wrote:

> > Mixali, ta locks ginontai se file descriptors ara den mporeis na deis
> > an kati einai locked an den to kaneis open. Kaneis open() kai elegxeis meta
> > me to flock() an einai locked. 
> Eixa tin entypwsi oti i flock() den elegxei, apla efarmozei locking. Tha to
> ksanakoitaksw.
Mporeis na elegxeis an ena arxeio einai locked an tin trexeis se non-blocking
mode (me to LOCK_NB). An epistrepsei EWOULDBLOCK tote to arxeio itan locked
apo alli efarmogi. An epistrepsei ok tote den itan locked, kai einai twra
apo autin tin efarmogi, opote kaneis oti thes na kaneis, kai meta tin
xanakaleis gia unlock.

> > Ta locks kanonizoun to sygxronismo. Opoios prolavei na kanei lock protos,
> > kerdizei, o allos perimenei na teleiwsei o prwtos. Prepei vevaia oles oi
> > efarmoges na xrisimopoioun locks, kati pou den symbainei syxna.
> > Prosexe omws ta locks den einai gia na empodizoun to anoigma tou arxeiou,
> > alla tin prospelasi se auto (read/write/append).
> Swsto, an kai, efoson den mporw na epiballw se olo to systima na sebetai ta
> locks, mallon tha to kanw mono mesa stin efarmogi mou.
Orismena systimata ypostirizoun mandatory locking, opote ypoxrewneis
to systima na tirei ta locks sou. (des kai proigoumeno mail)

> Michalis Kabrianis
> kabrianis at hellug.gr

-- 
Nikos Mavroyanopoulos
mailto:nmav at hellug.gr
I'm not rude, I'm "attitudinally challenged".
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/archives
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================



More information about the Linux-greek-users mailing list