FCGI

 view release on metacpan or  search on metacpan

ChangeLog  view on Meta::CPAN

Version 0.73 --  19 May 2011 <rafl@debian.org>
   - Stop claiming we ship a file called -e in the MANIFEST.

Version 0.72 --  19 May 2011 <rafl@debian.org>
   - Clean up Makefile.PL and restore compatibility with recent
     ExtUtils::MakeMaker versions.

Version 0.71_03 --  28 Apr 2011 <bobtfish@bobtfish.net>
   - Remove support for sfio which is an optional (and not enabled by default)
     compile option to perl that is never used.
   - Fix FCGI::Stream::READ() to warn() instead of croak() incase of
     wide characters which cannot be gracefully downgraded.
   - Fix warnings due to wide characters being mangled to note that accepting
     them is deprecated and will stop working at some point.
   - Various fixes to FCGI::Stream::READ() to improve handling of error and
     edge cases.
     - croak if called with invalid number of arguments
     - croak if length is negative
     - croak if offset is outside string
     - pad scalar if offset is greater than length
   - Fix in FCGX_Finish_r to discard any remaining data in input stream
     which otherwise ends up in next request. This fixes multiple requests
     being broken if something goes wrong whilst reading the initial request.

FCGI.pm  view on Meta::CPAN

Close a socket opened with OpenSocket.

=item $req->Accept()

Accepts a connection on $req, attaching the filehandles and
populating the environment hash.
Returns 0 on success.
If a connection has been accepted before, the old
one will be finished first.

Note that unlike with the old interface, no die and warn
handlers are installed by default. This means that if
you are not running an sfio enabled perl, any warn or
die message will not end up in the server's log by default.
It is advised you set up die and warn handlers yourself.
FCGI.pm contains an example of die and warn handlers.

=item $req->Finish()

Finishes accepted connection.
Also detaches filehandles.

=item $req->Flush()

Flushes accepted connection.

FCGI.xs  view on Meta::CPAN

PRINT(stream, ...)
    FCGI::Stream stream;
  PREINIT:
    int n;
    STRLEN len;
    register char *str;
    bool ok = TRUE;
  CODE:
    for (n = 1; ok && n < items; ++n) {
#ifdef DO_UTF8
        if (DO_UTF8(ST(n)) && !sv_utf8_downgrade(ST(n), 1) && ckWARN_d(WARN_UTF8))
            Perl_warner(aTHX_ WARN_UTF8, WIDE_CHAR_DEPRECATION_MSG,
                        "FCGI::Stream::PRINT");
#endif
        str = (char *)SvPV(ST(n),len);
        if (FCGX_PutStr(str, len, stream) < 0)
            ok = FALSE;
    }
    if (ok && SvTRUEx(perl_get_sv("|", FALSE)) && FCGX_FFlush(stream) < 0)
        ok = FALSE;
    RETVAL = ok ? &PL_sv_yes : &PL_sv_undef;
  OUTPUT:

Makefile.PL  view on Meta::CPAN

        $prefix = "$useinstalled/include" if $useinstalled;
        $libfound = 1;
        push @libs, $libspec;
    }
}
if (!$libfound && -d "$devkit/libfcgi" && -d "$devkit/include") {
    # devkit
    if (grep { ! -f "$devkit/include/$_" } @dist3 
        or grep { ! -f "$devkit/libfcgi/$_" } @dist2)
    {
        warn "This appears to be a FastCGI devkit distribution, " .
            "but one or more FastCGI library files are missing. \n" .
            "Please check the integrity of the distribution.\n";
        exit -1;
    }

    my $extrarules = join "\n",
        map { $b = $_; $b =~ s/\.c$//; my $s="$devkit/libfcgi/$b.c";
            "$b\$(OBJ_EXT): $s\n\t".
            '$(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) '."$s\n"; }
            @dist2;

README  view on Meta::CPAN

be found.

To configure the library Makefile.PL will run ./configure .
You may want to run it yourself beforehand because its findings
may not always be correct.
The configure.readme file describes how to run ./configure (and only that).

If you're on a solaris system and your installed fcgi library is 2.02b
or earlier, you'll probably want to use the included files.

The old interface of the FCGI module installs die and warn 
handlers that merely print the error/warning to STDERR (the 
default handlers print directly to stderr, which isn't redirected 
in the non sfio case). I'm not very happy with the result. 
Suggestions welcome.

Sven Verdoolaege
skimo@kotnet.org

configure  view on Meta::CPAN

    # Reject names that are not valid shell variable names.
    case $ac_envvar in #(
      '' | [0-9]* | *[!_$as_cr_alnum]* )
      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
    esac
    eval $ac_envvar=\$ac_optarg
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
    ;;

  esac
done

if test -n "$ac_prev"; then
  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
  as_fn_error $? "missing argument to $ac_option"
fi

if test -n "$ac_unrecognized_opts"; then
  case $enable_option_checking in
    no) ;;
    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  esac
fi

# Check all directory arguments for consistency.
for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
		datadir sysconfdir sharedstatedir localstatedir includedir \
		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
		libdir localedir mandir runstatedir
do
  eval ac_val=\$$ac_var

configure.readme  view on Meta::CPAN


Sharing Defaults
================

   If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists.  Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.

Operation Controls
==================

   `configure' recognizes the following options to control how it
operates.

`--cache-file=FILE'
     Use and save the results of the tests in FILE instead of
     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for

eg/threaded.pl  view on Meta::CPAN

#!/usr/bin/perl
use strict;
use warnings;
use threads;
use threads::shared;

use FCGI       qw[];
use IO::Handle qw[];

use constant THREAD_COUNT => 5;

my @count : shared = (0, (0) x THREAD_COUNT);

os_win32.c  view on Meta::CPAN

 *
 *--------------------------------------------------------------
 */
static void StdinThread(void * startup) 
{
    int doIo = TRUE;
    unsigned long fd;
    unsigned long bytesRead;
    POVERLAPPED_REQUEST pOv;

    // Touch the arg to prevent warning
    startup = NULL;

    while(doIo) {
        /*
         * Block until a request to read from stdin comes in or a
         * request to terminate the thread arrives (fd = -1).
         */
        if (!GetQueuedCompletionStatus(hStdinCompPort, &bytesRead, &fd,
	    (LPOVERLAPPED *)&pOv, (DWORD)-1) && !pOv) {
            doIo = 0;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.593 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )