if (m_bIsLocked) { // lock existed, ask user what to do if (isStale() ||
(execWarning != nullptr && (*execWarning)( this ))) { // remove file and create new
File::remove( m_aLockname );
File aFile(m_aLockname);
(void)aFile.open( osl_File_OpenFlag_Create );
aFile.close( );
syncToFile( );
m_bRemove = true; returntrue;
} else { //leave alone and return false
m_bRemove = false; returnfalse;
}
} else { // lock was created by us returntrue;
}
}
bool Lockfile::isStale() const
{ // this checks whether the lockfile was created on the same // host by the same user. Should this be the case it is safe // to assume that it is a stale lockfile which can be overwritten
OUString aLockname = m_aLockname;
Config aConfig(aLockname);
aConfig.SetGroup(LOCKFILE_GROUP ""_ostr);
OString aIPCserver = aConfig.ReadKey( LOCKFILE_IPCKEY ""_ostr ); if (!aIPCserver.equalsIgnoreAsciiCase("true")) returnfalse;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.11Bemerkung:
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.