diff options
Diffstat (limited to 'src/other_tools')
-rw-r--r-- | src/other_tools/just_mr/launch.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp index c085f5be..b1b918b2 100644 --- a/src/other_tools/just_mr/launch.cpp +++ b/src/other_tools/just_mr/launch.cpp @@ -91,13 +91,15 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file, std::optional<std::pair<std::filesystem::path, std::string>> mr_config_pair{ std::nullopt}; + // If gc locks are needed, ensure to keep them alive also for the exec call std::optional<LockFile> lock{}; + std::optional<LockFile> repo_lock{}; + if (subcommand and kKnownJustSubcommands.contains(*subcommand)) { auto const& flags = kKnownJustSubcommands.at(*subcommand); // Read the config file if needed if (flags.config) { - auto repo_lock = - RepositoryGarbageCollector::SharedLock(storage_config); + repo_lock = RepositoryGarbageCollector::SharedLock(storage_config); if (not repo_lock) { return kExitGenericFailure; } |