Quantcast
Channel: Ultimate Boot CD
Viewing all articles
Browse latest Browse all 1577

Re: CPU Burn-in still runs on background when user 'Ctrl+C'

$
0
0
2nd revision. I moved the first trap command to the place before the instances of cpuburn-in are started.

Code:
--- initrd-old/usr/local/bin/cpuburn   2012-10-25 14:20:26.628338545 +0800
+++ initrd-new/usr/local/bin/cpuburn   2012-10-25 14:17:05.000000000 +0800
@@ -23,8 +23,7 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
-# Last updated by Gert Hulselmans on 25 October 2012.
-# Patched by Explorer to fix a "Ctrl+C" bug and terminate cpuburn-in properly.
+# Last updated by Gert Hulselmans on 26 February 2009.


CPUS=`awk '/^processor/ {CPU=$3}; END {print CPU+1}' /proc/cpuinfo`
@@ -59,7 +58,6 @@
     echo
     echo 'To stop cpuburn-in, press any key.'

-    trap 'pkill cpuburn-in; trap - 2 3; exit' 2 3
     for i in `seq 1 $CPUS`; do
         echo
         echo "Starting instance $i of cpuburn-in ('cpuburn-in $time &')."
@@ -69,6 +67,5 @@

     read -s -n1
     pkill cpuburn-in
-    trap - 2 3
fi

Viewing all articles
Browse latest Browse all 1577

Trending Articles