summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-22 16:45:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-06-22 16:45:22 (GMT)
commit5bfd53629e93113a17fe7d6a7a24554dc3c17cdb (patch)
tree4f0f398e738ae73a9f31cb2aa2495b16a919a0a3
parent3919d40cfb23b2c763a4979c4a1512424adc8442 (diff)
parent5ed2ec1041b6aeec81b0f0a9775355a9b2c755a6 (diff)
downloadgit-5bfd53629e93113a17fe7d6a7a24554dc3c17cdb.zip
git-5bfd53629e93113a17fe7d6a7a24554dc3c17cdb.tar.gz
git-5bfd53629e93113a17fe7d6a7a24554dc3c17cdb.tar.bz2
Merge branch 'jn/gitweb-return-or-exit-cleanup'
* jn/gitweb-return-or-exit-cleanup: gitweb: Return or exit after done serving request Conflicts: gitweb/gitweb.perl
-rwxr-xr-xgitweb/gitweb.perl9
1 files changed, 9 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 9e5e0bf..9446376 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1109,6 +1109,15 @@ sub run {
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