Skip to content

Commit

Permalink
Merge branch 'jn/gitweb-return-or-exit-cleanup'
Browse files Browse the repository at this point in the history
* jn/gitweb-return-or-exit-cleanup:
  gitweb: Return or exit after done serving request

Conflicts:
	gitweb/gitweb.perl
  • Loading branch information
Junio C Hamano committed Jun 22, 2010
2 parents 3919d40 + 5ed2ec1 commit 5bfd536
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5bfd536

Please sign in to comment.