summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmdkapplet5
1 files changed, 5 insertions, 0 deletions
diff --git a/mdkapplet b/mdkapplet
index 1fbfdc24..1574ded1 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -187,12 +187,15 @@ Gtk2->main;
ugtk2::exit(0);
+my $mdv_update_pid;
+
# Signal management
sub harvester {
my ($_signame, $clean) = @_;
my ($childpid, @pids);
do {
$childpid = waitpid(-1, &WNOHANG);
+ undef $mdv_update_pid if $mdv_update_pid == $childpid;
push @pids, $childpid;
WIFEXITED($?) and refresh_gui(1);
} while $childpid > 0;
@@ -284,9 +287,11 @@ sub restart_applet() {
sub installUpdates() {
my $binfile = $0;
+ return if $mdv_update_pid;
my $oldmd5 = $release <= 10.2 ? mdkonline::md5file($binfile) : common::md5file($binfile);
logIt(N("Launching mdkupdate --applet\n"));
refresh_gui(0);
+ $mdv_update_pid = fork_exec('MandrivaUpdate', '--no-media-update', '--no-confirmation');
my $newmd5 = $release <= 10.2 ? mdkonline::md5file($binfile) : common::md5file($binfile);
restart_applet() if $newmd5 ne $oldmd5;
#my $w = $in->wait_message(N("Please wait"), N("Check updates"));