* speedy, the specified number of servers is started
* right away.) The default is 4.
*
+ * -c<interval>
+ * 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 <interval> 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.
* - check for and maybe create <base>
* - stat and lstat the <script>
* - stat the socket and check its timestamp
- * if it is too old, rename it to g<inum>.<pid> (where
- * <inum> and <pid> are in decimal)
- * and run garbage collection
- * - run cgi-fcgi -connect SOCKET SCRIPT
+ * if it is too old, unlink it
+ * - dup2 stderr, mark no cloexec
+ * - run cgi-fcgi -connect SOCKET \
+ * cgi-fcgi-interp --stage2 <was-stderr> <socket> <interp> <script>
+ *
+ * -E<was-stderr> does this:
+ * - dup2 <was-stderr> to fd 2
+ * - open /dev/null and expect fd 1 (and if not, close it)
+ * - become a new process group
+ * - lstat <socket> to find its inum, mtime
+ * - fork/exec <interp> <script>
+ * - periodically lstat <socket> and
+ * if inum, mtime have changed
+ * kill process group (at second iteration)
*/
#include "common.h"