summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-16 19:10:18 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-16 19:10:18 +0000
commit0e8c7b61b4f711f06b827efe4a7072e47df12079 (patch)
treef695e34b8d7e631a6b12e676694d899dc6265eb3 /mdkapplet
parent2abfe35d0f2b94ddb5fd05f5780a4309fc01ad03 (diff)
downloadmgaonline-0e8c7b61b4f711f06b827efe4a7072e47df12079.tar
mgaonline-0e8c7b61b4f711f06b827efe4a7072e47df12079.tar.gz
mgaonline-0e8c7b61b4f711f06b827efe4a7072e47df12079.tar.bz2
mgaonline-0e8c7b61b4f711f06b827efe4a7072e47df12079.tar.xz
mgaonline-0e8c7b61b4f711f06b827efe4a7072e47df12079.zip
(silentCheck) do not allow to run several instances of MandrivaUpdate
Diffstat (limited to 'mdkapplet')
-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"));