diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-16 19:10:18 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-16 19:10:18 +0000 |
commit | 0e8c7b61b4f711f06b827efe4a7072e47df12079 (patch) | |
tree | f695e34b8d7e631a6b12e676694d899dc6265eb3 | |
parent | 2abfe35d0f2b94ddb5fd05f5780a4309fc01ad03 (diff) | |
download | mgaonline-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
-rwxr-xr-x | mdkapplet | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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")); |