dropping STAR_ENABLE_FILE_LOCKING environmental variable

Michael Meeks michael.meeks at suse.com
Wed Feb 29 02:41:56 PST 2012


On Wed, 2012-02-29 at 10:23 +0000, Caolán McNamara wrote:
> We don't seem to have documented STAR_ENABLE_FILE_LOCKING anywhere, and
> random web searches don't seem to show that its generally known, 

	:-)

> Any uses of it, e.g. now defunct
> http://cgit.freedesktop.org/libreoffice/build/tree/patches/dev300/ubuntu-soffice-config.diff?h=ooo-build-3-2
> are of the form of
> export STAR_ENABLE_FILE_LOCKING=0
> which looks like it attempts to *disable* it, even though actually
> setting the variable, regardless of what value its set to, would
> *enable* it.

	Wow:

   if ( pFileLockEnvVar == (char*)1 )
        pFileLockEnvVar = getenv("STAR_ENABLE_FILE_LOCKING");
    if ( ! pFileLockEnvVar )
        return sal_True;
    ... actually implement LockRange ...

	seems to suggest we've not really been doing hard locking on unix
there, but only internal / advisory locking from:

sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream )

	Wow :-) Anyhow - it'd be really lovely to get this mess in tools sorted
out and ported over to use the sal file / directory abstraction.

> I reckon we should drop the stuff that's hooked off
> getenv("STAR_ENABLE_FILE_LOCKING"), any protest against that ?

	No protest here :-) looks like it cleans a chunk of code out of tools/
for the most part ?

	ATB,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list