aboutsummaryrefslogtreecommitdiff
path: root/gorillanest.pl.fcgi
diff options
context:
space:
mode:
Diffstat (limited to 'gorillanest.pl.fcgi')
-rwxr-xr-xgorillanest.pl.fcgi22
1 files changed, 22 insertions, 0 deletions
diff --git a/gorillanest.pl.fcgi b/gorillanest.pl.fcgi
new file mode 100755
index 0000000..2692877
--- /dev/null
+++ b/gorillanest.pl.fcgi
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+use Syntax::Keyword::Try;
+use FCGI;
+
+use lib '.';
+# BEGIN { require 'config.pl'; }
+BEGIN { require 'gorillanest.pl.cgi'; }
+
+try {
+ open STDERR, '>', LOG_FILE or die LOG_FILE . ": $!";
+ my $sock = FCGI::OpenSocket(SOCKET_FILE, 100);
+ my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, $sock);
+ while($request->Accept() >= 0) {
+ master();
+ }
+} catch ($error) {
+ info("Crashed: $error");
+}