Search squid archive

Re: Info on redirector's pattern

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefano Del Furia wrote:

In data Mon, 06 Mar 2006 22:43:34 +0100, Mark Elsen <mark.elsen@xxxxxxxxx> ha scritto:

Hi all,
i'm trying to build an educational project, for a Squid's redirector and i
would like to know what is the pattern to build it.
I think that could be this:

main
{
        while true
        {
                read stdin
                perform analysis
                write to stdout
        }
}

I'm on the right way or i miss something ???
Thanks in advance
Stefano


       http://www.squid-cache.org/Doc/FAQ/FAQ-15.html

       M.


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.0/275 - Release Date: 06/03/06

Thanks for the info.
I have read and i think to understand the process.
So i have build a simple redirector in C# under windows environment like this:

            string text = "";
            while ( Console.In.Peek() != -1 )
                {
                    text = Console.In.ReadLine();
                    Console.Out.WriteLine(text.ToUpper());
                }

But squid terminates every times that ad url is passed to redirector.

Note the example executes in a continuous loop. Your redirector is exiting after processing each url (e.g. when -1 == Console.In.Peek() ). Either add a surrounding loop that executes continuously, or modify the loop you have.

If i restart squid all works for another url and than stops again. ... and so on.

On the squid's log i get:

2006/03/07 16:13:15| WARNING: redirector #1 (FD 7) exited
2006/03/07 16:13:15| Too few redirector processes are running
2006/03/07 16:13:15| storeDirWriteCleanLogs: Starting...
2006/03/07 16:13:15| WARNING: Closing open FD   20
2006/03/07 16:13:15|   Finished.  Wrote 242 entries.
2006/03/07 16:13:15|   Took 0.0 seconds ( 242.0 entries/sec).
FATAL: The redirector helpers are crashing too rapidly, need help!

Could someone explain me why ?
Thanks in advance

Squid Cache (Version 2.5.STABLE12-NT): Terminated abnormally.

Chris

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux