[Bio] / FigKernelPackages / ServerThing.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/ServerThing.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.70, Thu Mar 17 18:40:41 2011 UTC revision 1.71, Thu Mar 17 20:30:01 2011 UTC
# Line 70  Line 70 
70                      # Loop through the fast CGI requests. If we have request throttling,                      # Loop through the fast CGI requests. If we have request throttling,
71                      # we exit after a maximum number of requests has been exceeded.                      # we exit after a maximum number of requests has been exceeded.
72                      require CGI::Fast;                      require CGI::Fast;
73                        open(SERVER_STDERR, ">", *STDERR);
74                      while ((MAX_REQUESTS == 0 || ++$requests < MAX_REQUESTS) &&                      while ((MAX_REQUESTS == 0 || ++$requests < MAX_REQUESTS) &&
75                             ($cgi = new CGI::Fast())) {                             ($cgi = new CGI::Fast())) {
76                            #
77                            # Remap STDERR. Inside here, our STDERR is a tie to a FCGI::Stream
78                            # so we need to save it to keep FCGI happy.
79                            #
80                            *SAVED_STDERR = *STDERR;
81                          my $function = $cgi->param('function') || "<non-functional>"; #HACK                          my $function = $cgi->param('function') || "<non-functional>"; #HACK
82                          # warn "Function request is $function in task $$.\n"; ##HACK                          # warn "Function request is $function in task $$.\n"; ##HACK
83                          RunRequest($cgi, $serverThing);                          RunRequest($cgi, $serverThing);
84                          # warn "$requests requests complete in fast CGI task $$.\n"; ##HACK Trace("Request $requests complete in task $$.") if T(3);                          # warn "$requests requests complete in fast CGI task $$.\n"; ##HACK Trace("Request $requests complete in task $$.") if T(3);
85                            *STDERR = *SAVED_STDERR;
86                      }                      }
87                      # warn "Terminating FastCGI task $$ after $requests requests.\n"; ##HACK Trace("Terminating FastCGI task $$ after $requests requests.") if T(2);                      # warn "Terminating FastCGI task $$ after $requests requests.\n"; ##HACK Trace("Terminating FastCGI task $$ after $requests requests.") if T(2);
88                        close(SERVER_STDERR);
89                  } else {                  } else {
90                      # Here we have a normal web service (non-Fast).                      # Here we have a normal web service (non-Fast).
91                      my $cgi = CGI->new();                      my $cgi = CGI->new();

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3