From badf9239e74f24f8aa6285d0df334c07d9e81de6 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 26 Mar 2022 00:51:51 -0400 Subject: [PATCH] boot/init: Kill splash after 10 seconds without it exiting --- boot/init/tasks/splash.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/boot/init/tasks/splash.rb b/boot/init/tasks/splash.rb index 95a78d67..b595e23c 100644 --- a/boot/init/tasks/splash.rb +++ b/boot/init/tasks/splash.rb @@ -29,6 +29,8 @@ class Tasks::Splash < SingletonTask # Implementation details-y; ask for the splash applet to be exited. def quit(reason, sticky: nil) return if @pid.nil? + + count = 0 # Ensures the progress is shown Progress.update({progress: 100, label: reason}) @@ -45,6 +47,12 @@ class Tasks::Splash < SingletonTask # Leave some breathing room to the CPU! sleep(0.1) + count += 1 + if count > 60 # 10 seconds~ish + $logger.fatal("Splash applet would not quit by itself...") + kill + break + end end @pid = nil