Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Skovhede <kenneth@hexad.dk>2018-10-31 23:16:32 +0300
committerKenneth Skovhede <kenneth@hexad.dk>2018-10-31 23:16:32 +0300
commitebd1aa697a76acb0ce00533db027ebbe9867b39b (patch)
tree5dfcd3a2930d61c0fa979e7c676c208bbdfcac31
parente33a145688bf9669be97ac9431321654afad669c (diff)
parent4611ddab2a3050839f88059036b8b4360c33be5c (diff)
Merge branch 'feature/fix_win_service_updater'
-rw-r--r--Duplicati/Service/Runner.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Duplicati/Service/Runner.cs b/Duplicati/Service/Runner.cs
index 4f2ae0f76..a9140b837 100644
--- a/Duplicati/Service/Runner.cs
+++ b/Duplicati/Service/Runner.cs
@@ -109,6 +109,22 @@ namespace Duplicati.Service
PingProcess();
}
}
+
+ // Check if the child process is signalling an update
+ if (m_process.ExitCode == Duplicati.Library.AutoUpdater.UpdaterManager.MAGIC_EXIT_CODE)
+ {
+ // If we are a spawned update process, our parent process will restart us
+ if (Duplicati.Library.AutoUpdater.UpdaterManager.IsRunningInUpdateEnvironment)
+ {
+ // Hard exit from here
+ Environment.Exit(Duplicati.Library.AutoUpdater.UpdaterManager.MAGIC_EXIT_CODE);
+ }
+ else
+ {
+ // Log this to help in debugging
+ m_reportMessage("Child process stopped with an update code, but we are not running in an update environment. Ignoring update request", true);
+ }
+ }
}
catch (Exception ex)
{