Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Issue 155772: This CL implements the second TODO item of issue 12343:... (Closed)

Created:
11 years, 5 months ago by james.su
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

This CL implements the second TODO item of issue 12343: 2) We should send back an ACK to the second process. If the second process doesn't get an ACK in the given timeout, it should kill the first process and go ahead and start. The approach of this CL is to append process id to the singleton's socket filename, such as "SingletonSocket-12345", and creates a symbol link "SingletonSocket" to the real socket file. In ProcessSingleton::NotifyOtherProcess() if it's successfully connected to "SingletonSocket" but no ACK received, then the original process can be killed by its process id retrieved from the symbol link. BUG=12343 ProcessSingleton Linux cleanups TEST=In one terminal, launch chrome and stop the process by pressing ctrl-z, then launch chrome again in another terminal. The second chrome shall be started in 5 seconds, and the first one shall be killed.

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 25

Patch Set 3 : '' #

Total comments: 6

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 2

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 17

Patch Set 9 : '' #

Total comments: 2

Patch Set 10 : '' #

Total comments: 4

Patch Set 11 : '' #

Patch Set 12 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+435 lines, -93 lines) Patch
M chrome/browser/process_singleton.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/process_singleton_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 19 chunks +327 lines, -87 lines 0 comments Download
A chrome/browser/process_singleton_linux_uitest.cc View 7 8 9 10 11 1 chunk +98 lines, -0 lines 0 comments Download
M chrome/browser/process_singleton_win.cc View 10 11 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/chrome.gyp View 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
james.su_gmail.com
Hi, It's my initial CL to fix the second TODO item of issue 12343. Please ...
11 years, 5 months ago (2009-07-20 15:05:06 UTC) #1
willchan no longer on Chromium
Hi James, Thanks for sending this out. I haven't taken a look at the code ...
11 years, 5 months ago (2009-07-20 16:51:04 UTC) #2
james.su_gmail.com
Hi, I just made a little improvement to this CL to use relative symbol link. ...
11 years, 5 months ago (2009-07-21 02:22:17 UTC) #3
willchan no longer on Chromium
Sorry for the delay. I only have some nits. http://codereview.chromium.org/155772/diff/1005/1007 File chrome/browser/process_singleton_linux.cc (right): http://codereview.chromium.org/155772/diff/1005/1007#newcode9 Line ...
11 years, 5 months ago (2009-07-22 00:27:45 UTC) #4
james.su_gmail.com
Thanks for your comment. I'll update the CL asap. Regards James Su http://codereview.chromium.org/155772/diff/1005/1007 File chrome/browser/process_singleton_linux.cc ...
11 years, 5 months ago (2009-07-22 03:12:25 UTC) #5
james.su_gmail.com
CL has been updated according to your comment. Please help review it again. Regards James ...
11 years, 5 months ago (2009-07-22 07:53:49 UTC) #6
willchan no longer on Chromium
lgtm now, although I just realized that there are no tests (we should have added ...
11 years, 5 months ago (2009-07-22 18:51:02 UTC) #7
james.su_gmail.com
Hi, CL has been updated. Please help review again. For unittest, can you give me ...
11 years, 5 months ago (2009-07-23 03:12:57 UTC) #8
willchan no longer on Chromium
On 2009/07/23 03:12:57, james.su wrote: > Hi, > CL has been updated. Please help review ...
11 years, 5 months ago (2009-07-23 03:31:17 UTC) #9
james.su_gmail.com
Thanks for your information. One question, when I add a unittest file, what build script ...
11 years, 5 months ago (2009-07-23 03:41:46 UTC) #10
willchan no longer on Chromium
Add your test to chrome/chrome.gyp. You'll see the appropriate section for the relevant test files ...
11 years, 5 months ago (2009-07-23 03:50:21 UTC) #11
james.su_gmail.com
Hi, A simple unittest has been implemented based on InProcessBrowserTest. However it's far from complete. ...
11 years, 5 months ago (2009-07-24 12:36:40 UTC) #12
willchan no longer on Chromium
Don't worry about case (1) for now. I need to think about that some more. ...
11 years, 5 months ago (2009-07-24 21:30:57 UTC) #13
james.su_gmail.com
Hi, Thanks for your feedback. I'll update the CL asap. Just two questions: 1. How ...
11 years, 5 months ago (2009-07-27 03:39:36 UTC) #14
james.su_gmail.com
Hi, I just changed the test to use UITest. Now it can test both success ...
11 years, 5 months ago (2009-07-27 11:00:41 UTC) #15
willchan no longer on Chromium
On 2009/07/27 11:00:41, james.su wrote: > Hi, > I just changed the test to use ...
11 years, 5 months ago (2009-07-27 16:09:00 UTC) #16
james.su_gmail.com
Sorry, my fault. The test file is not attached. Regards James Su On 2009/07/27 16:09:00, ...
11 years, 4 months ago (2009-07-28 00:32:16 UTC) #17
willchan no longer on Chromium
http://codereview.chromium.org/155772/diff/2018/2020 File chrome/browser/process_singleton_linux.cc (right): http://codereview.chromium.org/155772/diff/2018/2020#newcode113 Line 113: // Wait a socket for read for a ...
11 years, 4 months ago (2009-07-28 04:35:49 UTC) #18
james.su_gmail.com
Hi, Thanks for your feedback. Please see my comments below. And unfortunately, I still don't ...
11 years, 4 months ago (2009-07-28 05:15:57 UTC) #19
willchan no longer on Chromium
Please upload your latest snapshot, I didn't see a change. http://codereview.chromium.org/155772/diff/2018/2022 File chrome/browser/process_singleton_linux_uitest.cc (right): http://codereview.chromium.org/155772/diff/2018/2022#newcode74 ...
11 years, 4 months ago (2009-07-28 05:47:38 UTC) #20
james.su_gmail.com
The latest code has been uploaded. I'd prefer to keep the tests for linux only ...
11 years, 4 months ago (2009-07-28 07:42:50 UTC) #21
willchan no longer on Chromium
Ok, given the cross platform issues you've stated, I'm fine keeping this linux specific for ...
11 years, 4 months ago (2009-07-28 17:57:21 UTC) #22
james.su_gmail.com
Please see my comment below. Regards James Su http://codereview.chromium.org/155772/diff/1034/1035 File chrome/browser/process_singleton.h (right): http://codereview.chromium.org/155772/diff/1034/1035#newcode106 Line 106: ...
11 years, 4 months ago (2009-07-29 00:25:35 UTC) #23
james.su_gmail.com
CL updated, please help review again. Regards James Su
11 years, 4 months ago (2009-07-29 00:58:21 UTC) #24
willchan no longer on Chromium
LGTM, just have a small nitpick about constant placement. http://codereview.chromium.org/155772/diff/1042/2034 File chrome/browser/process_singleton_linux.cc (right): http://codereview.chromium.org/155772/diff/1042/2034#newcode259 Line ...
11 years, 4 months ago (2009-07-29 01:08:35 UTC) #25
james.su_gmail.com
Done. Thanks for your review. http://codereview.chromium.org/155772/diff/1042/2034 File chrome/browser/process_singleton_linux.cc (right): http://codereview.chromium.org/155772/diff/1042/2034#newcode259 Line 259: const int ProcessSingleton::kTimeoutInSeconds; ...
11 years, 4 months ago (2009-07-29 01:14:11 UTC) #26
willchan no longer on Chromium
I landed this but then had to revert it due to the ui test failure ...
11 years, 4 months ago (2009-07-29 19:21:29 UTC) #27
james.su_gmail.com
On 2009/07/29 19:21:29, willchan wrote: > I landed this but then had to revert it ...
11 years, 4 months ago (2009-07-30 02:27:10 UTC) #28
willchan no longer on Chromium
11 years, 4 months ago (2009-07-31 04:19:47 UTC) #29
I'm closing this code review since suzhe's opened up another one.

Powered by Google App Engine
This is Rietveld 408576698