Browse code

app_perl change to ignore "die" signals from eval blocks

rodolfojcj authored on 01/06/2021 12:06:32 • Daniel-Constantin Mierla committed on 07/06/2021 13:11:27
Showing 1 changed files
... ...
@@ -40,6 +40,7 @@ bootstrap Kamailio;
40 40
 
41 41
 BEGIN {
42 42
 	$SIG{'__DIE__'} = sub {
43
+		die @_ if( $^S or not defined $^S );
43 44
 		Kamailio::Message::log(undef, L_ERR, "perl error: $_[0]\n");
44 45
         };
45 46
 	$SIG{'__WARN__'} = sub {
Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,51 @@
1
+#
2
+# $Id$
3
+#
4
+# Perl module for Kamailio
5
+#
6
+# Copyright (C) 2006 Collax GmbH
7
+#                    (Bastian Friedrich <bastian.friedrich@collax.com>)
8
+#
9
+# This file is part of Kamailio, a free SIP server.
10
+#
11
+# Kamailio is free software; you can redistribute it and/or modify
12
+# it under the terms of the GNU General Public License as published by
13
+# the Free Software Foundation; either version 2 of the License, or
14
+# (at your option) any later version
15
+#
16
+# Kamailio is distributed in the hope that it will be useful,
17
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
+# GNU General Public License for more details.
20
+#
21
+# You should have received a copy of the GNU General Public License
22
+# along with this program; if not, write to the Free Software
23
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
24
+#
25
+
26
+package Kamailio;
27
+require Exporter;
28
+require DynaLoader;
29
+
30
+@ISA = qw(Exporter DynaLoader);
31
+@EXPORT = qw ( t );
32
+@EXPORT_OK = qw ( log );
33
+
34
+use Kamailio::Message;
35
+use Kamailio::Constants;
36
+use Kamailio::Utils::Debug;
37
+
38
+bootstrap Kamailio;
39
+
40
+
41
+BEGIN {
42
+	$SIG{'__DIE__'} = sub {
43
+		Kamailio::Message::log(undef, L_ERR, "perl error: $_[0]\n");
44
+        };
45
+	$SIG{'__WARN__'} = sub {
46
+		Kamailio::Message::log(undef, L_ERR, "perl warning: $_[0]\n");
47
+        };
48
+}
49
+
50
+1;
51
+