[squid-users] rredir.c redirector exiting from squid, not from command line

From: <Theresa.hilding@dont-contact.us>
Date: Tue, 05 Aug 2003 13:37:08 -0700

Hello,

I have a 2.5STABLE3 squid installation running under RedHat9. I have trimmed
the rredir.c program that was included in the squid contrib directory down
to its bare essentials (granted it's useless in that it does not perform any
redirection at this point) and added a while(1) statement to keep the
program in an endless loop:

#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>

#define BUFFER_SIZE (16*1024)

int
main()
{
    char buf[BUFFER_SIZE+1];

    /* make standard output line buffered */
    if (setvbuf(stdout, NULL, _IOLBF, 0) != 0)
        return 1;

    while (1) {

        /* scan standard input */
        while( fgets(buf, BUFFER_SIZE, stdin) != NULL) {
                (void) printf("\n");
        }
    }
    return 0;
}

I can feed this program my access.log file and it does not terminate
execution. When I configure squid to use this as its redirector program,
however, squid invariably dies with the following error "FATAL: too few
redirector processes are running".

BTW, I trimmed the code to almost nothing because I wish to use the
redirector feature for something other than the original program was
designed for.

Any ideas? Thanks,

Theresa Hilding
Received on Tue Aug 05 2003 - 14:37:03 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:18:43 MST