[squid-dev] Moved PID file management from Coordinator to Master

Tsantilas Christos chtsanti at users.sourceforge.net
Wed Jan 21 11:57:40 UTC 2015


I am posting a new patch.

This patch include fixes to follow Squid Coding Style but also have a 
fix for a small bug:
  In the previous patches I posted the pid creation done by master 
process but the pid file was not removed by master process. This patch 
fixes master process to remove pid file on exit.




On 01/21/2015 12:17 PM, Amos Jeffries wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 21/01/2015 10:57 p.m., Tsantilas Christos wrote:
>> On 01/20/2015 02:55 AM, Alex Rousskov wrote:
>>> On 01/16/2015 08:51 AM, Amos Jeffries wrote:
>>>> On 16/01/2015 11:29 a.m., Alex Rousskov wrote:
>>>>> In SMP, there is only one Coordinator process, created by
>>>>> the Master process.
>>>
>>>>> All SMP kids (Coordinator, workers, and diskers) are started
>>>>> by the Master process. There are no multiple levels as far as
>>>>> kid startup and waiting are concerned and, hence, there is no
>>>>> "level deeper than the master can see".
>>>
>>>
>>>> Hmm, okay. Then I have no problem per-se to this change of
>>>> esponsibility.
>>>
>>> Great, thank you.
>>>
>>>
>>>> I do still think the coordinator needs to remain active until
>>>> last out of the kids though, so they can still use it to
>>>> coordinate during their shutdowns. Having it be the first up
>>>> and last down would solve a few architectural problems where
>>>> kids need to to collaborate on things, like log rotations or
>>>> broadcasting their availability.
>>>
>>> Agreed!
>>
>>
>> This patch does not prevent coordinator process exit before the
>> workers, but also current squid does not guarantees that the
>> coordinator will exit after workers. I agree that we need to
>> implement it, but looks that this is out of the scope of this
>> patch.
>>
>> If there is not any objection I will apply this patch as is for
>> now.
>>
>
> Okay, lets give it a try.
>
> Can you please though make sure all the new functions use the Squid
> coding style instead of the one you keep slipping in. Squid style is
> this in .cc files:
>
>   type
>   functionName(...)
>   {
>      ... code ...
>   }
>
> Cheers
> Amos

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SQUID-5-move-PID-file-management-to-Master-t8.patch
Type: text/x-patch
Size: 40178 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150121/b9add6b3/attachment-0001.bin>


More information about the squid-dev mailing list