Merge branch 'feature/fix_win_service_updater'

This commit is contained in:
Kenneth Skovhede
2018-10-31 21:16:32 +01:00
+16
View File
@@ -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)
{