mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
refactor: introduce a more general LockDirectories for init
No functional change. This is in preparation for adding additional directory locks on startup.
This commit is contained in:
parent
1db331ba76
commit
cabb2e5c24
5 changed files with 25 additions and 22 deletions
|
|
@ -228,10 +228,10 @@ static bool AppInit(NodeContext& node)
|
|||
return InitError(Untranslated("-daemon is not supported on this operating system"));
|
||||
#endif // HAVE_DECL_FORK
|
||||
}
|
||||
// Lock data directory after daemonization
|
||||
if (!AppInitLockDataDirectory())
|
||||
// Lock critical directories after daemonization
|
||||
if (!AppInitLockDirectories())
|
||||
{
|
||||
// If locking the data directory failed, exit immediately
|
||||
// If locking a directory failed, exit immediately
|
||||
return false;
|
||||
}
|
||||
fRet = AppInitInterfaces(node) && AppInitMain(node);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue