diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-12-04 15:43:16 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-12-04 15:43:16 +0000 |
commit | 1dd30b8aabb4b2d9d46531c152f76fcdfbcfade8 (patch) | |
tree | 6f1489a8651ac9c0b9208096908d51648863f312 | |
parent | 75b6d8b98ec39728b7136e66296d444d85492814 (diff) | |
download | mgaonline-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-x | mdkapplet | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; } |