/* Licensed to the Apache Software Foundation (ASF) under one or more *contributorlicenseagreements.SeetheNOTICEfiledistributedwith *thisworkforadditionalinformationregardingcopyrightownership. *TheASFlicensesthisfiletoYouundertheApacheLicense,Version2.0 *(the"License");youmaynotusethisfileexceptincompliancewith *theLicense.YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting,software *distributedundertheLicenseisdistributedonan"ASIS"BASIS, *WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied. *SeetheLicenseforthespecificlanguagegoverningpermissionsand *limitationsundertheLicense.
*/
#if APR_HAVE_STDLIB_H #include <stdlib.h> /* For EXIT_SUCCESS, EXIT_FAILURE */ #endif
#if APR_HAVE_UNISTD_H #include <unistd.h> /* For execl */ #endif
staticconstchar *usage_message = "usage: fcgistarter -c <command> -p <port> [-i <interface> -N <num>]\n" "\n" "If an interface is not specified, any available will be used.\n";
while (--num_to_start >= 0) {
rv = apr_proc_fork(&proc, pool); if (rv == APR_INCHILD) {
apr_os_file_t oft = 0;
apr_os_sock_t oskt;
/* Ok, so we need a file that has file descriptor 0 (which *FastCGIwants),butpointstooursocket.Thisisn'treally *possibleinAPR,sowecheatabit.Ihavenoideahowto *dothisonanon-unixplatform,sofornowthisisplatform *specific.Ick. * *Notethatthishastohappenpost-detach,otherwisefd0 *getsclosedduringapr_proc_detachandit'sallfornothing. * *Unfortunately,doingthispostdetachmeanswehavenoway
* to let anyone know if there's a problem at this point :( */
rv = apr_file_dup2(infd, skwrapper, pool); if (rv) { exit(EXIT_FAILURE);
}
/* XXX Can't use apr_proc_create because there's no way to get *infdintotheprocattrwithoutgoingthroughanotherdup2, *whichmeansbythetimeitgetstothefastcgiprocessit
* is no longer fd 0, so it doesn't work. Sigh. */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.