What if a user starts chrome twice in quick succession? Process A
starts, looks for the pid file. Next process B starts and does the
same. Both don't see a file, so they both create one. One overwrites
the file created by the other. Now there are two "main" processes,
only one of which can be found using the file...

On 25/04/2009, Nikita Ofitserov <[email protected]> wrote:
>
> On 25 апр, 05:09, Peter Kasting <[email protected]> wrote:
>> On Thu, Apr 23, 2009 at 1:35 PM, Nikita Ofitserov <[email protected]>
>> wrote:
>> > I suggest:
>> > Don't try to get pid dynamically, but create on startup in datadir
>> > file 'ChromePid' or something like that with pid.
>>
>> Creating files during startup would slow startup too much.  Chrome
>> crashing
>> would leave a stale PID file lying around, confusing future launches.
>>
>> PK
>
> We need to create this file only once, during main process startup,
> not for every renderer/plugin process. Sorry if I haven't made it
> clear. I don't think that creating a text file once with one number
> would slow startup too much.
>
> And we don't really care about stale PID file. If future launch will
> find it there, it will search for process with that pid, then it will
> try to connect to IPC channel - if either of this fails, it will just
> continue launch, rewriting the file. So no confusion here.
>
> Nikita Ofitserov
> >
>

-- 
Sent from my mobile device

Berend-Jan "SkyLined" Wever ([email protected]) - Security Software
Engineer
Google NL B.V. Reg: C. Debussylaan 34, 15th floor 1082 MD A'dam 34198589 NL
VAT / Tax ID:- 812788515 B01

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to