From 48d408d4ecdb992552a4560c95d147605dcdfba0 Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Thu, 21 Aug 2025 01:47:28 +0000 Subject: [PATCH] Remove Log (just pipe it) & Be Quiet About config.pl --- config.default.pl | 3 +-- perl/cgi.pl | 2 +- perl/fcgi.pl | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/config.default.pl b/config.default.pl index 13566e9..326ddcf 100644 --- a/config.default.pl +++ b/config.default.pl @@ -1,6 +1,6 @@ # always assume anything to do with files or directories is ran at project root -no warnings 'redefine'; +no warnings; use constant { @@ -10,7 +10,6 @@ BARE_REQUEST => 0, IMMORTAL => 1, # will continue handling request after death/error -LOG_FILE => '/tmp/gorillanest.log', DB_FILE => 'gorillanest.sqlite3', # sqlite3 SOCKET_FILE => '/tmp/gorillanest.socket', diff --git a/perl/cgi.pl b/perl/cgi.pl index 3cbed42..d19c915 100755 --- a/perl/cgi.pl +++ b/perl/cgi.pl @@ -22,7 +22,7 @@ use Git::Repository; use lib qw(. ..); BEGIN { require 'config.default.pl'; } -BEGIN { require 'config.pl'; } +BEGIN { require 'config.pl' if -f 'config.pl'; } sub info { warn join(' ', @_); diff --git a/perl/fcgi.pl b/perl/fcgi.pl index 0f3dff8..b3e6d9e 100755 --- a/perl/fcgi.pl +++ b/perl/fcgi.pl @@ -11,7 +11,6 @@ BEGIN { require 'cgi.pl'; } while (1) { try { - open STDERR, '>', LOG_FILE or die LOG_FILE . ": $!"; my $request = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, \%ENV, BARE_REQUEST ? 0 : FCGI::OpenSocket(SOCKET_FILE, SOCKET_MAX_CONNECTIONS)); while($request->Accept() >= 0) { master(); -- 2.39.5