Squid - [squid-users] another copy of squid

This is Interesting: Free IT Magazines  
Home > Archive > Squid > May 2004 > [squid-users] another copy of squid





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [squid-users] another copy of squid
Ilya

2004-05-01, 7:35 am

Hello!

How does squid determine whether one copy of squid already run
or not?

wbr,
Ilya
Ilya

2004-05-01, 8:35 am

On Sat, 1 May 2004 17:13:30 +0530
"Davinder Sachdeva" <dsachdeva@locuz.com> wrote:
>type the following command as root on the machine
>
>ps -A|grep squid
>
>This command will show u all the instances of squid running.
>
>If u wish to kill the process, u will need to issue the
>command
>
>kill -9 <pid no>
>
>If the connections are active, it will take some time before
>squid process
>can actually get killed.


I did not mean just that.

I want to know how does squid determine whether it (squid) has
been already launched? If you will try to launch squid while
another copy is running, you will see: "squid is running". How
does squid guess ?

wbr,
Ilya.
Chris Wilcox

2004-05-01, 12:36 pm

>>type the following command as root on the machine
>
>I did not mean just that.
>
>I want to know how does squid determine whether it (squid) has been already
>launched? If you will try to launch squid while another copy is running,
>you will see: "squid is running". How does squid guess ?
>


It doesn't guess. When squid starts it'll create a pid file called
'squid'(not quite sure where?) and when it stops it will delete this pid
file. When you start Squid again it will check for the existence of this
pid file and if found Squid knows it is already running.

hth

Regards,

Chris

________________________________________
_________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger

Henrik Nordstrom

2004-05-01, 12:36 pm

On Sat, 1 May 2004, Ilya wrote:

> How does squid determine whether one copy of squid already run
> or not?


By the pid file and if there exists a running process with the same pid as
recorded in the pid file.

Regards
Henrik

Henrik Nordstrom

2004-05-01, 12:36 pm

On Sat, 1 May 2004, Chris Wilcox wrote:

> It doesn't guess. When squid starts it'll create a pid file called
> 'squid'(not quite sure where?)


Where specified by the pid_filename config directive.

Regards
Henrik

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com