X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=examples%2Flog-dump.c;h=d5ef8df5a60cba00cef5db37ca04a8231f1fad7d;hb=eb48783695bd108026960f57e202bf7b7868ad76;hp=d2023ad87523e017a5cdc737fa2c38a4648250fb;hpb=0198fd3ca83ad0dbdb1c3bfb967d1843a7d02296;p=catagits%2Ffcgi2.git diff --git a/examples/log-dump.c b/examples/log-dump.c index d2023ad..d5ef8df 100644 --- a/examples/log-dump.c +++ b/examples/log-dump.c @@ -1,4 +1,4 @@ -/* +/* * log-dump.c -- * * FastCGI example program to illustrate both an Authorizer and a @@ -14,29 +14,34 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * */ - #ifndef lint -static const char rcsid[] = "$Id: log-dump.c,v 1.1 1997/09/16 15:36:28 stanleyg Exp $"; +static const char rcsid[] = "$Id: log-dump.c,v 1.5 2001/09/01 01:12:26 robs Exp $"; #endif /* not lint */ -#include "fcgi_stdio.h" +#include "fcgi_config.h" + +#include #include #include -#ifdef HAVE_STRINGS_H -#include -#endif +#include #include #include #include -#ifndef NULL -#define NULL 0 +#if defined __linux__ +int kill(pid_t pid, int sig); +#endif + +#ifdef HAVE_UNISTD_H +#include #endif +#include "fcgi_stdio.h" + static int successCount = 0; static int failureCount = 0; -void main(void) +int main(void) { char *queryString = NULL; char *rolePtr; @@ -45,7 +50,7 @@ void main(void) int fd, n, i, j; char temp[4096]; char temp2[5000]; - + while(FCGI_Accept() >= 0) { rolePtr = getenv("FCGI_ROLE"); if(rolePtr == NULL) { @@ -129,4 +134,6 @@ void main(void) continue; } } + + exit(0); }