blob: 9e901f819cb77e506536d8eb66804e6c3d4f9b79 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
--- kenny.orig Sat Jan 5 23:45:34 2002
+++ kenny Sat Jan 5 23:45:34 2002
@@ -149,6 +149,7 @@
sub translate($);
sub addGermanUmlauts($);
sub printHelp();
+sub theyKilledKenny();
@@ -169,6 +170,15 @@
+##### Install signal handlers
+
+$SIG{HUP} = \&theyKilledKenny;
+$SIG{INT} = \&theyKilledKenny;
+$SIG{QUIT} = \&theyKilledKenny;
+$SIG{TERM} = \&theyKilledKenny;
+
+
+
##### Parse commandline arguments
# "-h" switch (print help):
@@ -224,6 +234,15 @@
##### That's all, folks!
exit 0;
+
+
+##### Signal handler, if we're kill(1)ed
+
+sub theyKilledKenny()
+{
+ print "Oh my God! They killed Kenny! You bastards!\n";
+ exit 0;
+}
|