]> git.proxmox.com Git - pve-installer.git/commitdiff
sys command: add missing imports, switch to UI for event processing
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Jun 2023 13:43:45 +0000 (15:43 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 20 Jun 2023 14:00:47 +0000 (16:00 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Proxmox/Sys/Command.pm

index d580e479dfd785f278743c1fc8c3a0a671fde279..c3e24b3fcfa2825a43c7405276cb9ee9e860975a 100644 (file)
@@ -4,14 +4,15 @@ use strict;
 use warnings;
 
 use Carp;
-use Gtk3 qw(); # FIXME: drop once possible (when (G)UI plugin approacg is there)
 use IO::File;
 use IPC::Open3;
 use IO::Select;
 use String::ShellQuote;
+use POSIX ":sys_wait_h";
 
 use Proxmox::Install::ISOEnv;
 use Proxmox::Log;
+use Proxmox::UI;
 
 use base qw(Exporter);
 our @EXPORT_OK = qw(run_command syscmd);
@@ -94,7 +95,7 @@ sub run_command {
     while ($select->count) {
        my @handles = $select->can_read (0.2);
 
-       Gtk3::main_iteration() while Gtk3::events_pending();
+       Proxmox::UI::process_events();
 
        next if !scalar (@handles); # timeout