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
Ahh... I forgot to tell that I've already patched this bug in my modified CPUstress image v2.1expl3.

Patch is attached below. Basically I added two trap commands to catch the signals generated by Ctrl+C and Ctrl+\, and finally release them.
Code:
--- initrd-old/usr/local/bin/cpuburn   2012-10-21 22:49:42.458631019 +0800
+++ initrd-new/usr/local/bin/cpuburn   2012-10-21 22:53:25.106636051 +0800
@@ -23,7 +23,8 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
-# Last updated by Gert Hulselmans on 26 February 2009.
+# Last updated by Gert Hulselmans on 7 September 2012.
+# Patched by Explorer to fix a "Ctrl+C" bug and terminate cpuburn-in properly.


CPUS=`awk '/^processor/ {CPU=$3}; END {print CPU+1}' /proc/cpuinfo`
@@ -65,7 +66,9 @@
         /opt/cpuburn/cpuburn-in $time &
     done

+    trap 'pkill cpuburn-in; trap - 2 3; exit' 2 3
     read -s -n1
     pkill cpuburn-in
+    trap - 2 3
fi

Viewing all articles
Browse latest Browse all 1577

Trending Articles