Re: GNOME registry



On Wed, Dec 30, 1998 at 06:37:50PM -0500, Jeff Garzik wrote:
> > On Wed, Dec 30, 1998 at 05:51:34PM -0500, Jeff Garzik wrote:
> > > > You could implement it in a few minutes - just pick some file
> > > > (~/.gnome/gnome-registry or something), then #define the prefix for
> > > > that file in libgnome, and maybe #define some keys you want all apps to
> > > > use, like email, etc.
> > >
> > > Does gnome_config_* do file locking?
> > 
> > no ... but IT NEEDS TO!
> 
> It doesn't look to difficult to add.  It also uses getc() to read the
> entire file a character at a time.  Even with stdio buffering the call
> overhead on that is awful.
> 
> What is the Unix-preferred method of file sharing?  I don't have my APUE
> handy.  :)  And is it universal enough to not need a configure-time
> check?

there is another problem with gnome_config ... if one program reads some
file ... then a second program writes to it and the first program
changes something in the file and syncs as well .. both writes in the same
second .... the changes from the second program are lost ... (since the
first program doesn't notice the changes and dumps the memory into the
file the way it was when it first read it)

maybe one needs to lock files until one syncs the files ... all profiles
that have the written_to flag should be locked I guess ... and everybody
would have to wait ... now we'll have fun with deadlocks ...

the character at a time reading struck me as ineffective yesterday too
but ... oh well ... the rewrite should be better I guess

George

-- 
------------------------------------------------------------------------------
George Lebl <jirka@5z.com> http://www.5z.com/jirka/
------------------------------------------------------------------------------
  The following implements RSA in perl and is illegal to export from the US:

          #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
          $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
          lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)



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