Improved error logging for the Tentacle server.

This commit is contained in:
Ramon Novoa 2015-07-13 12:40:47 +02:00
parent 62cc0e2abe
commit ca1db98cfd
1 changed files with 4 additions and 5 deletions

View File

@ -684,7 +684,7 @@ sub accept_connections {
my $pid; my $pid;
my $t_server_socket; my $t_server_socket;
# Ignore SIGPIPE errors (happens on FreeBSD when SSL is enabled ¿?) # Ignore SIGPIPE
$SIG{PIPE} = 'IGNORE'; $SIG{PIPE} = 'IGNORE';
# Start server # Start server
@ -736,9 +736,6 @@ sub accept_connections {
sub serve_client() { sub serve_client() {
eval { eval {
local $SIG{__DIE__} = sub {
print STDERR $_[0];
};
# Add client socket to select queue # Add client socket to select queue
$t_select = IO::Select->new (); $t_select = IO::Select->new ();
$t_select->add ($t_client_socket); $t_select->add ($t_client_socket);
@ -977,8 +974,10 @@ sub print_log {
sub error { sub error {
if ($t_quiet == 0) { if ($t_quiet == 0) {
die("[err] $_[0]\n\n"); print (STDERR "[err] $_[0]\n");
} }
die("\n");
} }
################################################################################ ################################################################################