aboutsummaryrefslogtreecommitdiff
path: root/gorillanest.pl.fcgi
diff options
context:
space:
mode:
authorEmil Williams2025-08-21 00:32:48 +0000
committerEmil Williams2025-08-21 00:32:48 +0000
commit658f9c0c0fcce6a6371fbdaf8f74a5ca4265c9a9 (patch)
tree7011e66cf1a349ed78885591ab76f6dae3179e5e /gorillanest.pl.fcgi
parenta721871310beeb290f060511bc5ad58b2f485f35 (diff)
downloadgorillanest-658f9c0c0fcce6a6371fbdaf8f74a5ca4265c9a9.tar.xz
gorillanest-658f9c0c0fcce6a6371fbdaf8f74a5ca4265c9a9.tar.zst
Immortality
Diffstat (limited to 'gorillanest.pl.fcgi')
-rwxr-xr-xgorillanest.pl.fcgi17
1 files changed, 10 insertions, 7 deletions
diff --git a/gorillanest.pl.fcgi b/gorillanest.pl.fcgi
index 7dc343f..afba9be 100755
--- a/gorillanest.pl.fcgi
+++ b/gorillanest.pl.fcgi
@@ -9,12 +9,15 @@ use FCGI;
use lib '.';
BEGIN { require 'gorillanest.pl.cgi'; }
-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();
+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();
+ }
+ } catch ($error) {
+ info("Crashed: $error");
}
-} catch ($error) {
- info("Crashed: $error");
+ exit 1 unless (IMMORTAL);
}