X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=blobdiff_plain;f=cprogs%2Fcgi-fcgi-interp.c;h=ef48cfda3b80af8b02e6375639943f07558a44cf;hp=f2ba0bdb1a98174c9c22e4788cf85b50a51c575c;hb=d4e42bf295490da6b6f4ab8d5249b158d774d450;hpb=925487e1be73d42c3ae6cf6c460cc3ee97612276 diff --git a/cprogs/cgi-fcgi-interp.c b/cprogs/cgi-fcgi-interp.c index f2ba0bd..ef48cfd 100644 --- a/cprogs/cgi-fcgi-interp.c +++ b/cprogs/cgi-fcgi-interp.c @@ -2,7 +2,31 @@ * "Interpreter" that you can put in #! like this * #!/usr/bin/cgi-fcgi-interp [] * #!/usr/bin/cgi-fcgi-interp [], + */ +/* + * cgi-fcgi-interp.[ch] - C helpers common to the whole of chiark-utils + * + * Copyright 2016 Ian Jackson + * Copyright 1982,1986,1993 The Regents of the University of California + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this file; if not, consult the Free Software + * Foundation's website at www.fsf.org, or the GNU Project website at + * www.gnu.org. + * + * See below for a BSD 3-clause notice regarding timespeccmp. + */ +/* * The result is a program which looks, when executed via the #! * line, like a CGI program. But the script inside will be executed * via in an fcgi context. @@ -26,6 +50,14 @@ * speedy, the specified number of servers is started * right away.) The default is 4. * + * -c + * Stale server check interval, in seconds. The worker + * process group will get a SIGTERM when it is no longer + * needed to process new requests. Ideally it would continue + * to serve any existing requests. The SIGTERM will arrive no + * earlier than after the last request arrived at + * the containing webserver. Default is 300. + * * -D * Debug mode. Do not actually run program. Instead, print * out what we would do. @@ -37,14 +69,13 @@ * cgi-fcgi-interp automatically expires old sockets, including * ones where the named script is out of date. */ - /* * Uses one of two directories * /var/run/user//cgi-fcgi-interp/ * ~/.cgi-fcgi-interp// * and inside there uses these paths * s - * g + * l used to lock around garbage collection * * If -M is not specified then an initial substricg of the * lowercase hex of the sha256 of the