bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: reloading domain


From: Elan Ruusamäe
Subject: Re: reloading domain
Date: Mon, 27 Jul 2009 01:50:18 +0300
User-agent: KMail/1.11.2 (Linux/2.6.27.15-1; KDE/4.2.3; x86_64; ; )

On Monday 27 July 2009 01:24, Bruno Haible wrote:
> > well. it doesn't work if the file is REPLACED
> > ...
> > #ifdef DELETE
> >         system("rm "LOCALEDIR"/et/LC_MESSAGES/roke.mo");
> > #endif
> >         system("cp 2.mo "LOCALEDIR"/et/LC_MESSAGES/roke.mo");
> >
> >         bindtextdomain(PACKAGE, "/");
> >         bindtextdomain(PACKAGE, LOCALEDIR);
>
> Yes, when a file is loaded with mmap, "cp" to the file is a recipe for
> disaster. You have to use 'mv' or 'install', so that the new version of the
> file gets a different inode number.

so i understand as:
1. using cp, inode is preserved, but can cause other disasters when gettext 
doesn't expect file change, i.e it file contents overwrite should be followed 
by the bindtextdomain(PACKAGE, "/"); invalidation hack.

2. using rm+cp (via install(1)) however makes it impossible to invalidate 
cache?

so as summary, no reliable solution now to reload gettext catalog runtime?

-- 
glen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]