From 22a3093815ad6a4428647d87d75e9224eb154fc8 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 18 Sep 2024 04:08:16 +0400 Subject: [PATCH] Check updater exit status on Linux --- Telegram/SourceFiles/platform/linux/launcher_linux.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp index 008910300..3c853c7cd 100644 --- a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp @@ -109,6 +109,7 @@ bool Launcher::launchUpdater(UpdaterLaunch action) { Logs::closeMain(); CrashReports::Finish(); + int waitStatus = 0; if (justRelaunch) { return GLib::spawn_async( initialWorkingDir().toStdString(), @@ -129,8 +130,8 @@ bool Launcher::launchUpdater(UpdaterLaunch action) { nullptr, nullptr, nullptr, - nullptr, - nullptr)) { + &waitStatus, + nullptr) || !g_spawn_check_exit_status(waitStatus, nullptr)) { return false; } return launchUpdater(UpdaterLaunch::JustRelaunch);