From c98864560e1c7f7b23c2b520eef4d2cd577a3320 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Sat, 7 Mar 2009 00:39:37 -0600 Subject: [PATCH] "nice" the apt-check --- bin/updates-available | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/updates-available b/bin/updates-available index da259391..6cffa566 100755 --- a/bin/updates-available +++ b/bin/updates-available @@ -70,6 +70,11 @@ else exit 0 fi +# If we make it to this point, we actually have to do hard computational +# work to calculate updates. Let's try to be "nice" about it: +renice 10 $$ >/dev/null &2>1 || true +ionice -c3 -p $$ >/dev/null &2>1 || true + # If apt-check binary exists, use it if [ -x /usr/lib/update-notifier/apt-check ]; then u=`/usr/lib/update-notifier/apt-check 2>&1 | tail -n 1 | sed "s/;/ /"`