summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-12-04 15:43:16 +0000
committerThierry Vignaud <tv@mandriva.org>2007-12-04 15:43:16 +0000
commit1dd30b8aabb4b2d9d46531c152f76fcdfbcfade8 (patch)
tree6f1489a8651ac9c0b9208096908d51648863f312
parent75b6d8b98ec39728b7136e66296d444d85492814 (diff)
downloadmgaonline-1dd30b8aabb4b2d9d46531c152f76fcdfbcfade8.tar
mgaonline-1dd30b8aabb4b2d9d46531c152f76fcdfbcfade8.tar.gz
mgaonline-1dd30b8aabb4b2d9d46531c152f76fcdfbcfade8.tar.bz2
mgaonline-1dd30b8aabb4b2d9d46531c152f76fcdfbcfade8.tar.xz
mgaonline-1dd30b8aabb4b2d9d46531c152f76fcdfbcfade8.zip
(silentCheck) prevent running an external command, and set priority
earlier, so that urpm::request_packages_to_upgrade behaves nicely with other processes
-rwxr-xr-xmdkapplet6
1 files changed, 5 insertions, 1 deletions
diff --git a/mdkapplet b/mdkapplet
index 34b41d43..256f53c7 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -331,6 +331,10 @@ sub silentCheck() {
# immediate exit, else forked gtk+ object destructors will badly catch up parent applet
my $_safe = before_leaving { POSIX::_exit(0) };
+
+ # be nice with other processes:
+ setpriority('PRIO_PROCESS', $$, 7);
+
my $exit = sub {
my ($state) = @_;
POSIX::_exit($comm_codes{$state}{code});
@@ -350,7 +354,7 @@ sub silentCheck() {
}
$exit->('locked') if $will_not_update_media;
- if (my $res = !run_program::raw({ sensitive_arguments => 1 }, 'nice', '-n7', 'urpmi.update', '--update')) {
+ if (my $res = !run_program::raw({ sensitive_arguments => 1 }, 'urpmi.update', '--update')) {
$exit->('error_updating') if $will_not_update_media;
}