diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 9e5e0bf3ee6a86df6329da145f7f597e7abf491f..9446376535b1790c2400cd5bbc1e12f1a8b8f7c9 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
run();
+if (defined caller) {
+ # wrapped in a subroutine processing requests,
+ # e.g. mod_perl with ModPerl::Registry, or PSGI with Plack::App::WrapCGI
+ return;
+} else {
+ # pure CGI script, serving single request
+ exit;
+}
+
## ======================================================================
## action links